投稿時間:2023-08-18 00:21:56 RSSフィード2023-08-18 00:00 分まとめ(25件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Microsoft、「Xbox 360 ストア」を2024年7月29日で閉鎖 https://taisy0.com/2023/08/17/175471.html marketplacexboxcom 2023-08-17 14:50:06
AWS AWS Government, Education, and Nonprofits Blog Creating agentless outbound campaigns to support Medicaid unwinding efforts https://aws.amazon.com/blogs/publicsector/create-agentless-outbound-campaigns-medicaid-unwinding/ Creating agentless outbound campaigns to support Medicaid unwinding effortsWith state Medicaid agencies SMAs contacting all their members contact centers must scale to meet increased demandーhowever staffing shortages can make this outreach and call support difficult SMAs can support staff members and make sure members get their communications needs met by using AWS and cloud technology to introduce automation into their outreach process Learn how to deploy a serverless outbound campaign to meet Medicaid unwinding outreach needs and support agency staff members by streamlining the outreach process 2023-08-17 14:16:16
Ruby Railsタグが付けられた新着投稿 - Qiita wheneverを使った指定日時にメール送信をする方法 https://qiita.com/_OnO_/items/24b3a52122f51f7d015b whenever 2023-08-17 23:54:55
海外TECH Ars Technica Lenovo’s answer to Steam Deck, Legion Go, sports Switch-like detachable controls https://arstechnica.com/?p=1961506 large 2023-08-17 14:08:26
海外TECH MakeUseOf What to Do if the Default Printer Keeps Changing on Windows https://www.makeuseof.com/default-printer-keeps-changing-windows/ windows 2023-08-17 14:16:22
海外TECH MakeUseOf How to Secure Your Spring Application With Spring Security https://www.makeuseof.com/secure-spring-app-with-spring-security/ framework 2023-08-17 14:01:29
海外TECH DEV Community Understanding the automatic minimum size of flex items https://dev.to/tsudhishnair/understanding-the-automatic-minimum-size-of-flex-items-3fcd Understanding the automatic minimum size of flex itemsEmbrace the power of Flexbox in CSS for crafting dynamic and responsive UIs Ever struggled with text overflow wrecking your layout Dive into this article to unravel the mystery behind automatic minimum size behavior of flex items Read it here 2023-08-17 14:54:53
海外TECH DEV Community Best CI/CD tools for React Native https://dev.to/logrocket/best-cicd-tools-for-react-native-25ga Best CI CD tools for React NativeWritten by Hussain Arif️Continuous integration CI and continuous delivery CD pipelines are a set of automated processes that help developer teams deliver software more quickly and reliably CI pipelines automate the process of building testing and deploying code while CD pipelines automate the process of delivering that code to the end user In this article we will discuss the most popular CI CD pipelines used by React Native developers Here s what we will discuss today What problems does a CI CD pipeline solve Expo App Services Pros and cons of EAS Microsoft App Center Pros and cons of MAC GitHub Actions Pros and cons of GitHub Actions CodeMagic Pros and cons of CodeMagic Honorable mentions Bitrise Pros and cons of Bitrise Jenkins Pros and cons of Jenkins Comparison table What problems does a CI CD pipeline solve As developers we know that one of the most crucial steps while programming is to build deploy and test our code To make this happen we can do the following Create a separate branch on our repository called production When someone on the team commits to the branch that team member must run a build script to create an executable file Finally the developer has to download this file on their machine and then upload it to a distribution platform Through this platform clients can then download and run the appEven though this solution works there are a few issues with this This process is tedious In the first step developers must first commit to the branch and then run a build script This takes up valuable time because the building process involves compiling the project testing and producing an artifact file Furthermore it consumes valuable resources on the local machine which may lead to serious problems in cases where the project s codebase is large and complexThis is the problem a CI CD pipeline comes in to solve Let s cover a few different options for React Native development Expo App Services The Expo Application Services EAS tool is geared towards React Native and Expo projects from the ground up As a result this means that the deployment and building process is a walk in the park ーit is the easiest tool on this list to work with because it only requires a few commands to get up and running For example to build and publish all we need to do is the following npm install global eas clinpx eas login sign into the serviceeas build configure this will generate an eas json file this file will allow you to configure your building process For more information on deployment and build configuration navigate to Expo s documentation Pros and cons of EAS Here are some of the things I like about EAS It s the easiest option to host and deploy apps especially if they re built with Expo Developers provide an option to host the Expo Build process on your server but consequently it is suited for companies where the project s code has to be kept private Handles the stressful stuff for you like signing certificates and keystore files which saves a lot of engineering time and effort Provides extensive documentation in case you need help Supports both Expo and React Native appsHere are the cons The free tier is limited if builds are frequent During peak hours you might have to wait a bit for your builds to complete on the free tier which might be a problem if you re on a tight deadline As of writing this article running EE tests is in an early state though support continues to develop Microsoft App CenterMicrosoft App Center MAC is a CI CD platform dedicated to app development Unlike Expo Application Services it supports both React Native and other cross platform technologies like Unity and Xamarin Here s what it looks like Building an app on App Center is a bit involved but it is still straightforward First upload your project on GitHub Azure or another code hosting platform Next specify the project s location in App Center s settings Finally the service will then ask you to configure your build settings You also might have to generate and upload a keystore file in this step That s it When that s done the pipeline will start building the app for you Pros and cons of MAC Microsoft App Center has some significant strengths that stand out among the competition It can run a test to verify whether the app can launch successfully It is particularly useful in situations where you need to ensure the functionality of a new build With this feature you can verify this without manually running the app on a mobile device Here are a few other pros worth mentioning The free tier is generous In many cases it is enough for personal and small scale projects but the service also provides a day free trial for their paid tier Provides clear and exhaustive documentation Supports end to end tests Widely used in enterprise environments so extensive support is available from the communityHowever there were some things that I found unappealing No option to run builds on local infrastructure As discussed before this might be a problem in situations where source code privacy is important Paid option may be too expensive for small startups EE tests are locked behind a paywall As of writing this article Microsoft doesn t support Expo apps GitHub ActionsGitHub Actions is a prominent option among numerous open source programmers One reason for its popularity is that this tool integrates with GitHub so developers can use it to automate their workflows directly from their GitHub repository Although building an app on GitHub Actions is tricky it provides greater control over the building process as compared to other platforms thus making it a worthwhile trade off To deploy with GitHub Actions create a folder in your repo called github workflows There create a new file called ci yml This tells GitHub that our project will use GitHub Actions for deployment After this step follow the instructions in this LogRocket article to build a CI CD pipeline using GitHub Actions in React Native Pros and cons of GitHub Actions Here are some of the reasons why this pipeline service might be suitable for you The service allows for more control which means that you can add tests and even change your build agent Its free tier is more than enough for personal projects Moreover GitHub even issues Pro accounts for students which allows them to upgrade to a paid option for free Other than building apps GitHub Actions can also run automated code quality checks This is suitable in situations where you want to detect code smells and bugs in your project before deployment The self hosted runners feature allows companies to host their version of Actions on local infrastructure As discussed before this is great for private code repositories The free tier allows for end to end testsHowever as compared to other platforms here are some things that I didn t like The process of building a CI CD pipeline is too involved In some cases it might be too complex for beginners who are looking to deploy their app GitHub Actions does not have dedicated documentation for React Native apps Because of this you might have to rely on the community for help CodeMagicCodeMagic is another CI CD pipeline specifically geared towards mobile app development frameworks including Flutter Cordova Ionic and others Just like Expo and Microsoft s App Center deploying and building your React Native app is fairly easy To get started create a file called codemagic yml in your React Native app and write the following code workflows sample workflow name Codemagic Sample Workflow max build duration instance type mac mini mThis tells the pipeline that our build will use Apple s M Mac machine for deployment After this step it s best to head to CodeMagic s documentation to learn how to build and deploy your project Pros and cons of CodeMagic Here are some of the things I loved about it Their servers use Apple s M series machines which leads to rapid build times CodeMagic uses a pay as you go model which means that you only pay for the resources you use In some cases this might be a cheaper option as compared to other services in this list Amazing documentation with step by step guides Supports end to end tests on the free tierHowever there were some things that I didn t like about it Does not have a self hosted option which can be a problem for privacy sensitive code Honorable mentionsProfessional mobile developers also widely use other CI services such as Bitrise and Jenkins CI Since these services have compilation steps similar to Microsoft App Center we won t discuss their building processes here BitriseJust like CodeMagic this service is geared towards mobile app development Furthermore it supports add ons to help in development with for example debug reports or release management Pros and cons of Bitrise Here are some aspects of Bitrise that might make it a appealing option Rapid build times Just like CodeMagic this also supports Apple s M series machines to compile and build code Pay as you go model The biggest upside to this service is that you can save money by only paying for the resources you use Supports end to end tests on the free tierHowever there were some flaws that might be a deal breaker to some Does not provide a self hosted option JenkinsJenkins is another pipeline service that is targeted towards enterprises and large businesses This is because the software is completely self hosted As discussed before this is great for situations where the project s source code has to be kept private Pros and cons of Jenkins One major factor that made me like Jenkins was that it is completely self hosted Because of this Jenkins is a popular tool among larger businesses This is because self hosting allows companies to avoid spending money on expensive tiers and instead use local hardware However this comes at a cost maintaining and making sure your Jenkins host remains secure might be a hassle for some teams Comparison tableHere is a small table that summarizes all pros and cons of all platforms discussed in this article ToolKey FeaturesProsConsPricingExpo Application ServicesBuilt for React Native and Expo projectsEasiest to deploy Handles certificates and keystore files Extensive documentationLimited free tier Peak hours may require waiting Early state of EE testsFree tier amp Paid tiersMicrosoft App CenterSupports multiple platforms including React NativeGenerous free tier Runs app launch tests EE tests support Extensive documentationNo local infrastructure Can be costly for startups EE tests behind paywall No support for Expo appsFree tier amp Paid tiersGitHub ActionsIntegrates directly with GitHub repositoryMore control Pro accounts for students Automated code quality checks Self hosted runners EE tests on the free tierComplex setup Lacks dedicated documentation for React NativeFree tier amp Paid tiersCodeMagicSpecifically geared towards mobile app frameworksUses Apple s M series machines Pay as you go model Extensive documentation EE tests on the free tierNo self hosted optionPay as you goBitriseBuilt for mobile apps Uses Apple s M series machinesRapid build times Pay as you go model Great documentation EE tests on the free tierNo self hosted optionPay as you goJenkins CICompletely self hosted no online hosting option availableGreat for maximum privacy and security Completely freeMaintaining and hosting of the CI server on local infrastructure can be a painFree ConclusionIn this article we briefly discussed some popular CI CD platforms for React Native and why they are crucial in the programming world We also included some honorable mentions Jenkins CI and Bitrise in our comparison table It is important to remember that every project is different and therefore it is important to evaluate each tool s advantages and disadvantages In my projects I typically use Expo Services because it is incredibly easy to set up and use and its free tier is more than enough for my needs Thank you so much for reading LogRocket Instantly recreate issues in your React Native apps LogRocket is a React Native monitoring solution that helps you reproduce issues instantly prioritize bugs and understand performance in your React Native apps LogRocket also helps you increase conversion rates and product usage by showing you exactly how users are interacting with your app LogRocket s product analytics features surface the reasons why users don t complete a particular flow or don t adopt a new feature Start proactively monitoring your React Native apps ーtry LogRocket for free 2023-08-17 14:51:37
海外TECH DEV Community Auto Generate Post Thumbnail in Python using Html2Image https://dev.to/nilan/auto-generate-post-thumbnail-in-python-using-html2image-3055 Auto Generate Post Thumbnail in Python using HtmlImageIf you ve been sharing a link on any social media you ve probably seen the preview “card This is done using specific meta tags called Open Graph Open graph tags enhance the link with a richer presentation Checkout this full video tutorial hereHere is how the open graph tags look like lt html prefix og gt lt head gt lt title gt StackTips Resources for Developers lt title gt lt Facebook Meta Tags gt lt meta property og url content gt lt meta property og type content website gt lt meta property og title content StackTips Resources for Developers gt lt meta property og description content StackTips provides developer friendly ways to learn programming We aim to teach developers in the most efficient ways possible through articles courses and quizzes gt lt meta property og image content gt lt Twitter Meta Tags gt lt meta name twitter card content summary large image gt lt meta name twitter title content StackTips Resources for Developers gt lt meta name twitter description content StackTips provides developer friendly ways to learn programming We aim to teach developers in the most efficient ways possible through articles courses and quizzes gt lt meta name twitter image content gt lt head gt lt html gt This means we have to create an image for every single piece of content on your website But for website site which generates high volumes of content it is quite hard to create a custom image for every single post To solve this problem websites such as dev to or github com have created an automated process to generate thumbnails for every single piece of content on the site In this post I will show you how to automatically generate the thumbnail for your blog post in Python For this we will need two Python dependenciesJinja is a popular template engine for Python It was made after Django s template htmlimage This allows you to run a Chrome browser in the headless mode render the HTML template and then generate the screenshot of your browser output Let s first install Jinja and htmlImage python packages You can install them using the following commandspip install Jinjapip install htmlimage HTML TemplateOnce the packages are installed let us now create a HTML template file for our thumbnail In this example I am displaying the Post title and other images lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset UTF gt lt meta name viewport content width device width initial scale gt lt meta http equiv X UA Compatible content ie edge gt lt title gt My Website lt title gt lt link rel stylesheet href style css gt lt link rel icon href favicon ico type image x icon gt lt head gt lt body gt lt main gt lt div class main wrapper gt lt div class title wrapper gt lt h class post title gt post title lt h gt lt div class meta gt lt img src author image url class author avatar alt author Image gt lt span class author name gt author name lt span gt lt div gt lt div gt lt img src brand logo url class brand logo alt Brand Image gt lt img src category image class category icon alt Category Image gt lt div gt lt main gt lt body gt lt html gt Template StylesheetHere is my css stylesheet for the template import url wght display swap body background color font family Inter sans serif main wrapper background fff opacity background image radial gradient bbb px transparent px radial gradient bbb px fff px background size px px background position px px width height position fixed top left z index display flex align items center post title font size vw text align left margin bottom font weight title wrapper position fixed left width height auto line height text align left margin top px margin left px padding em meta margin top px background red height px display flex justify content left align items center author avatar height px border radius px author name margin left px font size rem font weight brand logo position absolute height px width px right bottom category icon position absolute height px width px right bottom Generate Thumbnail from HTML in PythonNow we have our template ready let us use the following Python script which will generate the thumbnail using the htmlimage from pathlib import Pathfrom jinja import Environment FileSystemLoaderfrom htmlimage import HtmlImagehti HtmlImage size environment Environment loader FileSystemLoader templates template environment get template template html content template render post title What is WebClient How to use WebClient in Java SpringBoot author name Nilanchala Panigrahy author image url brand logo url category image css string Path templates style css read text res hti screenshot html str content css str css string save as thumbnail png size First we are creating an instance of the HtmlImage class by specifying the desired size of the generated image pixels width and pixels height An instance of Environment class is created with a file system loader pointing to a directory named templates Then a specific template named template html is loaded from this environment and renders the template using the provided variables such as post title author name etc Then we are using the HtmlImage library and calling the screenshot method to generate the thumbnail image It takes the rendered HTML content CSS styles output filename thumbnail png and the size of the image as parameters The result image is stored in the file system OutputNow run your python code and notice that it will generate the following thumbnail This code is pretty basic You can of course change it for your requirement to generate desired thumbnail layout This tutorial is first published on stacktips com If you like this article follow me on twitter ask nilan or checkout my Youtube channel TheTechMojo for more such contents Happy learning 2023-08-17 14:46:27
海外TECH DEV Community JavaScript: How conditionals influence your code? https://dev.to/fullstackjo/javascript-how-conditionals-influence-your-code-5040 JavaScript How conditionals influence your code Everybody makes decisions all the time These decisions impact our lives and bring change with each different choice we make Conditionals are structures that offer you different results depending on the input you provide Conditionals are the decision makers of your code In this article we re going to cover If StatementsIf else StatementsNested If elseTernary OperatorSwitch StatementLogical Operators with conditionalsNullish Coalescing Operator If StatementsWe ve previously learned about Operators For a decision to be made comparison operators are combined with conditionals The if statement will execute only if the condition that was passed to it is true let a if a gt console log a is greater than the result a is greater than In this example the if statement checks if a is greater than This expression a gt returns a boolean value true or false and in our example the result is true If else StatementsLet s say you have a meeting with someone named Greg You re waiting for them in the meeting room no one is allowed in that room except for Greg The person at the door needs to make sure that the person who wants to attend the meeting is named Greg When checking their employeeID they re gonna check for their name If their name is Greg then they re allowed to enter If it is not which in this case would mean else then they won t be able to access the room let name greg if name greg console log this is greg this person can attend the meeting else console log this is not greg This person cannot attend the meeting Nested If elseNested if else indicates the use of multiple if else statements within each other The nested if else allows more decisions to be made depending on multiple conditions Checking if a number is greater or less than another is a great example to see how this works let x if x gt console log Number is greater than if x gt console log Number is also greater than else console log Number is not greater than else console log Number is not greater than In our example we re checking if the number is greater than which in our case it is Since our expression x gt is true we re going to check if x gt in the inner if else Since x gt evaluates to false our result is going to be Number not greater than If x was equal to then the expression x gt would have evaluated to false and our output would have been Number not greater than The Ternary Operator The ternary operator makes it possible for you to write a simple conditional statement that can be expressed in a single line of code let employeeId let message employeeId This is Greg This is not Greg console log message In This example we are checking the employeeId If this expression employeeId returns true then The result will be This is Greg If it returns false meaning the employeeId is not equal to then the result will be This is not Greg Switch StatementThe Switch Statement can be used instead of nested if else statements It provides a way to compare a value with other various values and executes the code of a matching case Let s look at the syntax switch expression case a code break case b code break default code The switch statement will evaluate the expression passed inside the parentheses The result of the evaluated expression will be then be compared to all the cases we have If a match is found the code of the matched case will be executed If a match was not found the code block found in the default case will be executed Here s an example let dayNumber let dayName switch dayNumber case dayName Sunday break case dayName Monday break case dayName Tuesday break case dayName Wednesday break case dayName Thursday break case dayName Friday break case dayName Saturday break default dayName Invalid day console log The day is dayName The result will be The day is Tuesday Logical Operators with conditionalsIn the previous article we got to know what are Logical operators Let s see how we can use them with Conditionals let age let isMember true let message if age gt if isMember message You are eligible for a senior discount else message You are eligible for a senior non member discount else if isMember message You are eligible for a regular member discount else message You are not eligible for any discounts console log message Nullish Coalescing OperatorThe nullish coalescing operator makes it possible for you to assign a default value to a variable that might be null or undefined If the left hand side operand is null or undefined it returns the right hand side operand else it returns the left hand side operand let username null let message username John console log message result Guest 2023-08-17 14:38:18
海外TECH DEV Community Pushing application metrics to otel-collector https://dev.to/ashokan/pushing-application-metrics-to-otel-collector-3275 Pushing application metrics to otel collectorPrometheus uses a pull model to collect metrics from targets This means that Prometheus actively queries the targets for their metrics at regular intervals The pull model is simple to implement and can be used to monitor a wide variety of targets However it can also be inefficient as Prometheus may have to query targets that do not have any new metrics to report While not equally popular Prometheus also supports push model through PUSH gateway The push model scores as it can be used out of box without service discovery challenges or altering prometheus configuation but can be more complex to implement and it can also be more difficult to scale OpenTelemetry new kid on the block supports both pull and push models for collecting metrics The main difference between the two models in OpenTelemetry is that the push model is implemented using a standardized protocol called the OpenTelemetry Collector API This makes it easier to integrate OpenTelemetry with a variety of monitoring systems ComparisonFeaturePull ModelPush ModelImplementationPrometheus scrapes metrics from the target at regular intervals The target sends metrics to the OpenTelemetry Collector at regular intervals ProtocolPrometheus uses its own proprietary protocol The OpenTelemetry Collector API is a standardized protocol that can be used with a variety of monitoring systems Ease of implementationThe pull model is simpler to implement The push model is more complex to implement but it can be more efficient for targets that do not change frequently ScalabilityThe pull model can be more scalable as Prometheus can scale out to handle more targets The push model can be less scalable as the OpenTelemetry Collector may need to be scaled to handle more targets How to use opentelemetry APIs to PUSH metrics to otel collectorLet us setup otel collector to accept metrics and PUSH to prometheus remote write exporter❯cat otel collector config yamlreceivers otlp protocols grpc endpoint http endpoint processors batch exporters logging verbosity detailed prometheusremotewrite endpoint https demo mimir api v push external labels foo bar env demoservice pipelines metrics receivers otlp processors batch exporters logging prometheusremotewrite Note we use opentelemetry collector contrib as opentelemetry collector doesn t support prometheusremotewrite yet❯cat docker compose yaml otel collector image otel opentelemetry collector contrib volumes otel collector config yaml etc otelcol contrib config yaml ports pprof extension Prometheus metrics exposed by the collector Prometheus exporter metrics health check extension OTLP gRPC receiver OTLP http receiver zpages extension Open telemetry metrics API is very extensive and has a hierarchy of components to create group process and export metrics It also supports two kinds of metrics instruments in Otel terms synchronous and asynchronous read more hereThe code to instrument is a simple flask application to roll diceimport randomimport timefrom flask import Flask request jsonifyapp Flask name def do roll time sleep random randint return random randint app route roll def roll roll do roll if roll gt return jsonify roll roll error out of bounds return jsonify roll roll app route ping def ping message pong return jsonify message message if name main app run host port debug True Once we add instrumentation the code looks like this import randomimport timefrom flask import Flask request jsonifyfrom opentelemetry import metricsfrom opentelemetry sdk metrics import MeterProviderfrom opentelemetry sdk metrics export import PeriodicExportingMetricReaderfrom opentelemetry exporter otlp proto grpc metric exporter import OTLPMetricExporterfrom opentelemetry sdk resources import SERVICE NAME SERVICE NAMESPACE SERVICE VERSION Resource Service name is required for most backendsresource Resource attributes SERVICE NAME dice roller SERVICE NAMESPACE devx SERVICE VERSION COLLECTOR ENDPOINT http localhost INTERVAL SEC Boiler plate initializationmetric reader PeriodicExportingMetricReader OTLPMetricExporter endpoint COLLECTOR ENDPOINT INTERVAL SEC provider MeterProvider metric readers metric reader resource resource Sets the global default meter providermetrics set meter provider provider Creates a meter from the global meter providermeter metrics get meter dice roller Add instrumentscalls meter create counter name api calls duration meter create up down counter name api duration errors meter create counter name api errors size meter create histogram name response size app Flask name decorator to add metrics to a functiondef add metrics func def wrapper args kwargs attributes path func name calls add attributes start time time time result func args kwargs end time time time duration add end time start time attributes size add len result attributes return result return wrapperdef do roll time sleep random randint return random randint add metrics app route roll def roll roll do roll if roll gt errors add path roll return jsonify roll roll add metrics app route ping def ping message pong return jsonify message message if name main app run host port debug True We create a meter provider with the OTLP exporter This exporter sends metrics to the endpoint http localhost We create a meter from the meter provider This is where we create our instruments We create our instruments We create a counter for the number of API calls an up down counter for the duration of the API calls a counter for the number of errors and a histogram for the size of the response We create a decorator to add metrics to our functions This decorator adds to the number of API calls measures the duration of the function and measures the size of the response We create the function that rolls the dice We add a random delay to simulate a real API call To verify one can check the otel collector log for the PUSHed metrics otel collector Descriptor otel collector gt Name api callsotel collector gt Description otel collector gt Unit otel collector gt DataType Sumotel collector gt IsMonotonic trueotel collector gt AggregationTemporality Cumulativeotel collector NumberDataPoints otel collector Data point attributes otel collector gt path Str roll otel collector StartTimestamp UTCotel collector Timestamp UTCotel collector Value otel collector Metric otel collector Descriptor otel collector gt Name api durationotel collector gt Description otel collector gt Unit otel collector gt DataType Sumotel collector gt IsMonotonic falseotel collector gt AggregationTemporality Cumulativeotel collector NumberDataPoints otel collector Data point attributes otel collector gt path Str roll otel collector StartTimestamp UTC Same can be verified in the Grafana connected to Mimir configured as the prometheusremotewrite exporter in the otel collector More reading 2023-08-17 14:30:12
海外TECH DEV Community From Vue 2 to 3: A long journey https://dev.to/nikhilverma/from-vue-2-to-3-a-long-journey-58ff From Vue to A long journey TL DRThis is a long post detailing my journey of migrating a project from Vue to It contains the setbacks and the victories I faced and providing breakdown of the issues as well Learning VueI joined my current team on May the project I was working with was built using Vue And Vuex and plain Javascript Vue was already out at that point however it was not the default Vue version It won t be the case until Feb The need for typesI was new to Vue back then and came from a React and Typescript codebase My first commit was to add a tsconfig json just to have some intellisense The pain point at that time was that Vue extend for Vue had poor support for Typescript I wanted to fix it The solution came with the usage of vue class component with a combination of vue property decorator Using a combination of the two allowed us to define components in a way that provide a reasonable amount of type safety The migration to class components was done incrementally any new features or components were written using the class syntax And older components were refactored out whenever we needed to modify them We also switched our VSCode plugin from Vetur to Volar which had better Typescript support Using Vuex wrongThe Vuex stores were configured in the traditional redux style stores They had a file structure like so store actions js getters js index js mutations js state js types jsGood luck finding the right store by name Or landing on the right action mutation because there was no support for intellisense This was solved by migrating the stores to use vuex module decorators which came with a much better support for Typescript Plus you get all actions mutations getters etc in a single file so it s easier to understand This was also done incrementally First setbackThere was a spike done into the feasibility of migrating to Vue It didn t last long because of the following reasons We used an internal UI library which depended on components that weren t compatible or were unstable with Vue at the timevee validatev tooltipvue showdownvue multiselectvue grid layoutWe couldn t figure out a reasonable strategy to migrate the UI library to Vue because then we would need to manage two versions of the same library that had other dependents too We absolutely did not want to stop shipping our product while the migration was happening it either had to be incremental or quick vee validate and the slots problemThe biggest hurdle that we faced was vee validate It is a form validation library built for Vue The pain was that the library API for Vue and were entirely different You would almost call it another library this was due to the new breaking slots implementation in Vue more on that later This was also confirmed by the author of the libraryOur UI library had used vee validate to create a form builder that was used over times in our application We couldn t find an incremental upgrade path here Either we migrate them all or we migrate none slots between Vue and Vue The official migration documentation for slots unification goes over the API differences But it omits a major fact in Vue it s not possible to get the DOM elements of the slots used by your component from the reference to the slot You would need to render your parent then use the parent s HTML node to get the child slot selector Or use some kind of inject provide workaround This is the main reason why the vee validate library could not use it s earlier simpler API A new hopeOn st July Vue was released It finally ported many features from Vue back to Vue This was a pivotal moment in our development because we it came with a solid Typescript support out of the box using defineComponent This was better than vue class component because it needed some hacks to get inter component type inference to work matrunchyk had done a fantastic job creating a codemod to automatically migrate Vue class components to the earlier syntax It was not perfect but workable I made some further modifications to it to get it to work on our project It s available here if you want to try it for yourself NikhilVerma vue codemod It s still not polished enough to consider an upstream pull request but you can hack around to migrate your project with it We finally migrated to Vue and defineComponent using the codemod in a very short time Also used this to migrate most of the codebase to Typescript Here is the timeline recorded in our JIRA ticket DateJS Filesth December nd Feb nd Feb th Feb th Mar Apr Apr May Aug At the same time we noticed several library dependencies being migrated to support Vue with minimal API changes This was exciting The solution to vee validateNow the only thing preventing a smooth migration was the vee validate library We were in luck because our UI team was working on a second version of the Flow UI library which was written using Lit And it also offered a replacement Form builder which could take over the vee validate one Since the new library was written using Lit it was agnostic of Vue so incremental migration was easy Let s do thisThe final plan was in place Migrate all old form and vee validate instances with the new Lit onesMigrate remaining UI components in the library to support Vue Migrate the application to Vue in a single PRThe first step took around a month to complete as the instances has to be migrated incrementally The second step was faster around a week to migrate because most of the other libraries had good backwards compatibility The third was surprisingly easy too Vue codemod helped a lot and ESLint Typescript caught most issues And the lifesaver was our automation suite which made sure we didn t break any critical functionality in the application Here is a screenshot of the pull request which migrated our app to Vue edited out the internal bits After almost two years We migrated to Vue Because we prepared so well the final merge was uneventful We had a few bugs discovered afterwards mostly due to how boolean attributes have changed in Vue AftermathWe are happily using Vue since then And I hope that future Vue upgrades will be less eventful and not require writing posts like these I hope this was helpful to you I am sure that there are others who are still using Vue on larger codebase and having a tough time with it And I hope by sharing their experiences it will encourage others to start their migration journey 2023-08-17 14:19:49
海外TECH DEV Community What happens when you type google.com in your browser and press Enter… https://dev.to/divine016/what-happens-when-you-type-googlecom-in-your-browser-and-press-enter-45fa What happens when you type google com in your browser and press Enter… ABSTRACTHave you ever tried using a new pc and you want to do a search on a topic and you are not satisfied with the results you get on the browser available Then you decide you would use the browser available to access google com Yeah that has happened to me too Have you ever wondered what happens in the background when you type google com on Microsoft edge Or what happens when you enter a URL on the web browser or search engine and get your results One thing we know for sure is that when we type google com we wait for a few seconds then we get our google page displayed on the screen for use But in reality there are a lot of processes happening in the background so that we could get our page In this article we would talk about what really happens in the background and all the different processes involved such as DNS TCP IP HTTPS and many more When the google com is typed The different cache are first checked The bowser looks at different cache such as the browser cache operating system cache router cache and ISP internet service provider cache to see if we have the IP address of that domain name stored in it If the IP address is found then the browser uses the IP address found in the cache to establish a connection with the server Cache it refers to a temporal storage of data Taking an example of the browser cache IP addresses are temporarily stored in it such that if a research is made and the IP address of the domain name is found in the browser cache then a connection is made with the IP found in the cache and the server speeding up the process required to get the results since the browser does not have to send a request to the DNS server DNS QUERYIf the IP address is not found in the cache then the Internet service provider sends a query to the DNS server so that it resolves the domain name into an IP address DNS Domain name system for short DNS is a server that contains ip addresses for domain names When a domain name is typed in the browser the DNS translates it into an IP address which can be used to gain access to websites and other materials on the internet TCP IP CONNECTIONOnce the IP address of google com is obtained a connection is made between the browser and the server which contains the IP of google com This connection is possible through the TCP IP known as transmission control protocol internet protocol which is a protocol that governs the way information is being shared over the internet And this process is known as TCP way handshake The TCP IP is one type of protocol as there exist many types of protocols such as UTP and each protocol is used for different reasons Once the connection is made the browser and server can communicate together FIREWALLMost computers using the windows operating system have a built in firewall A firewall is a security system that is there to control and monitor incoming and outgoing network traffic on a device based on its configuration If the computer has a firewall it would check to see if the connection is secure or not If the connection is secure then the browser and the server can share information if not the firewall would block the browser from accessing information coming from the server Also if the server is behind a firewall it would check to see if the connection is secure if not it blocks requests coming from that computer HTTPS SSLOnce the connection between the browser and server is established the browser needs to get data from the server This is done by using either Hypertext transfer protocol or Hypertext transfer protocol secure for short http or https respectively Http is a protocol that is used to share data between browsers and servers The difference between Http and Https is https has a layer of security that the information being shared over https is being encrypted while that of http is not encrypted We would consider using Https to get the data from the browser The browser sends a HTTP request to the server using an encryption protocol which is secure socket layer SSL now known as transport layer security TLS the browser says hey server I would like to get google com and the server processes the REQUEST and then sends a reply yes you can have the page This reply could include files that include HTML CSS JavaScript images videos and other media files LOAD BALANCINGFrom nginx website Load balancing refers to efficiently distributing incoming network traffic across a group of backend servers also known as a server farm or server pool When you type google com in the browser the load balancer takes this request and forwards the request to a server which would reply to this request in a fast and reliable manner Once the server has a reply it would forward this reply to the load balancer which would then forward the reply to your browser As mentioned above this reply may include files videos and other media files If you want to know more about load balancing visit this websitesite Web serverThe webserver is responsible for accepting and answering users demand for static content such as HTML CSS and JavaScript files That is content that does not require interaction Page rendering and displayThe web server has given the response to the browser now we need to be able to see this response on our screens In this case the response we have is google com This response contains html CSS and javascript code The html code is parsed and the CSS is used to style the html The javascript code is then executed by the browser and all of this is displayed on our screens Making us to see the google home page when we type google com on our browsers In some cases our request would need to involve the Application and database servers Application server and database server The Application server is responsible for providing dynamic content to users For example when you login or provide some information to a website and there is information provided to you based on your location or your preferences or based on the information you provided that s the application server at work For short the application server permits users to interact with their content Databases are like storage Let s take a database to be like a well organised store where we store our goods in an orderly manner Databases are used to store all types of information depending on what we are creating the database for There are different types of database but this is not what we are talking about right Now how do the webserver application server and database server work together to provide us with information Once the web server sends the information to the browser and the information is displayed on the screen if the user needs to interact with the website or the page maybe by submitting a form then the web server would send a request to the application server If the request needs information from the database then the application server would send a request to the database server so as to get the information required from its database The database server would then forward the response acquired to the application server which would then process this response then display the response on your screen Conclusion I hope after reading this article you have been able to understand what happens in the background when you enter a google com or a URL in your browser Thank you for reading If you have any question you can reach out to me on twitterOr send me an email on koutidivine gmail com 2023-08-17 14:13:47
海外TECH DEV Community Creating shimmering text, color change text in Loader using Framer Motion, Next.js 13 https://dev.to/annasidiakina/creating-shimmering-text-color-change-text-in-loader-using-framer-motion-nextjs-13-1nmf Creating shimmering text color change text in Loader using Framer Motion Next js While building my last app I was fascinated by the Loader with changing color company name that our designers provided It is really calming to look at it and wait in meditation until the page loads Install Next js npm create next app latestNeed to install the following packages create next app Ok to proceed y y√What is your project named animated loader√Would you like to use TypeScript No Yes√Would you like to use ESLint No Yes√Would you like to use Tailwind CSS No Yes√Would you like to use src directory No Yes√Would you like to use App Router recommended No Yes√Would you like to customize the default import alias No YesRun the development servernpm run devClean up all unnecessary code we don t need it anymore For this project I ll use Styled Components Don t forget to add use client at the top of each styled js file Let s create our basic styled navbar component first and adding it to our global layout file in the project If you re not familiar with what a layout file is it s basically a new file type introduced in Next js v which can be used to create the layout for your site By default Next js would create a layout file for you in the root of your app named layout js We can import there header with menu and footer npm i styled componentsIn the src directory create a libfolder and add a registry js file inside with the following code use client import React useState from react import useServerInsertedHTML from next navigation import ServerStyleSheet StyleSheetManager from styled components export default function StyledComponentsRegistry children Only create stylesheet once with lazy initial state x ref lazy initial state const styledComponentsStyleSheet useState gt new ServerStyleSheet useServerInsertedHTML gt const styles styledComponentsStyleSheet getStyleElement styledComponentsStyleSheet instance clearTag return lt gt styles lt gt if typeof window undefined return lt gt children lt gt return lt StyleSheetManager sheet styledComponentsStyleSheet instance gt children lt StyleSheetManager gt Now wrap our app with the StyledComponentsRegistry Navigate to the layout js file in the app folder and add it import globals css import Inter from next font google import Suspense from react import Loading from loading import Menu from components navigation Navigation import StyledComponentsRegistry from lib registry const inter Inter subsets latin export const metadata title Animated loader description animated loader export default function RootLayout children return lt html lang en gt lt body className inter className gt lt div className main gt lt div className gradient gt lt div gt lt StyledComponentsRegistry gt lt main className app gt lt Menu gt lt Suspense fallback lt Loading gt gt children lt Suspense gt lt main gt lt StyledComponentsRegistry gt lt body gt lt html gt In the same app folder create a file loading js const Loading gt return lt div gt Loading lt div gt export default Loading We ll pass this to the fallback of the Suspense component as our future animated loader I ve also created two pages About and Movies Let s fetch movies from You ll need to create account and get API key I usually keep that kind of stuff in env file Next in the app directory create two folders about and movies and create a page js file in each folder for the respective pages Add the following code to movies page js import Movies from components Movies Movies export async function getMovies let res await fetch process env NEXT PUBLIC TMDB API await new Promise resolve gt setTimeout resolve return res json export default async function MoviesPage const results await getMovies return lt Movies movies results gt In src directory create the components folder Inside it create another folder named Movies In this folder create Movies jsx and Movies styled js files In Movies jsx create a functional component import Section from Section Section import Image from next image export default function Movies movies console log movies movies return lt Section gt lt h gt Movies lt h gt lt ul gt movies map movie gt lt li key movie id gt lt Image src movie poster path alt movie title width height gt lt p gt movie title lt p gt lt li gt lt ul gt lt Section gt You ll need to modify next config js to display images type import next NextConfig const nextConfig images domains image tmdb org remotePatterns protocol https hostname tmdb org port pathname t p w module exports nextConfig Now we have our movies Let s add some styling Well that looks much better Now let s move on to creating our loader To achieve that we need to do a little magic in Figma Create two ellipses with a size around px and add the company name text inside them I used the following colors Blue DCBEGreen DFDFYellow for contrast changing color FFEAThe text is blue size and font Jua extra bold Right click and choose Outline Stroke Now we need to create our yellow letters For that I created every letter separately Then right click and choose again Ouline stroke That way we create svg letters one by one Now do this for each letter Don t forget to change their color to yellow You have to get something like this We need yellow letters separately to animate them individually Next step is to place yellow letters above blue ones that way Last step is we need to group blue svg text and finally group all yellow letters with blue text Now export files two ellipses and group with letters from Figma to the public images folder in the project Create the Loaderfolder in components Create the file Loader jsx It will be our common loader component First we need to wrap the loader in container Create Loader styled js export const Container styled div position relative height vh width margin auto display flex justify content center align items center Now add Loader Container with ellipses Now we create ellipse animation I add ellipses as background image of before and after of LoaderContainer One ellipse rotates clock wise another in opposite direction Import keyframes from styled components const rotate keyframes transform rotate deg scale transform rotate deg scale transform rotate deg scale const rotateOpposite keyframes transform rotate deg scale transform rotate deg scale transform rotate deg scale Add the animation to ellipses export const LoaderContainer styled div position absolute transform translate left top height px width px margin auto amp before content display block position absolute height px width px background image url images blueEllipse svg background repeat no repeat background position center animation rotate s linear infinite amp after content display block position absolute height px width px background image url images greenEllipse svg background repeat no repeat background position center animation rotateOpposite s linear infinite Import Container and LoaderContainer to Loader jsx From letters svg in images create component You can use SVGR or do it manually It will look like this Import Letters to Loader component use client import Letters from Letters import Container LoaderContainer from Loader styled export const Loader gt return lt Container gt lt LoaderContainer gt lt Letters gt lt Container gt Now the loader looks like this ellipses are rotating letters are static Install Framer Motionnpm i framer motionImport motion from framer motion in Letters jsx Now we need to isolate all yellow letters Add id attributes to identify each letter Replace lt svg gt to lt motion svg gt and lt path gt to lt motion path gt only for yellow letter lt motion path id m for letter M d M C rest fill FFEA gt Create a delay function const delay i gt return i Pass i in each motion path tag that way that each letter starts the animation a bit later than the previous one Set the duration to second Add animateand transitionproperties to each motion path using the delay function for the delay of each letter e g delay for the first letter and delay for the last lt motion path id m animate opacity transition duration duration ease linear repeat Infinity delay delay d M C etc fill FFEA gt lt motion path id o animate opacity transition duration duration ease linear repeat Infinity delay delay d M C etc fill FFEA gt lt motion path id v animate opacity transition duration duration ease linear repeat Infinity delay delay d M C etc fill FFEA gt Import the Loader component to loading js in the app folder and check how it works You can choose any colors you like adjust the duration increase the delay and experiment with different animations The possibilities are endless and it s all up to your imagination and creativity 2023-08-17 14:12:51
海外TECH DEV Community Record in TypeScript: Unveiling Its Surprising Power https://dev.to/brainiacneit/record-in-typescript-unveiling-its-surprising-power-30kf Record in TypeScript Unveiling Its Surprising Power Introduction TypeScript with its robust type system continues to offer developers an array of features that enhance code quality maintainability and overall development experience Among its lesser known gems is the Record type which often remains in the shadows compared to more frequently used types like string number and boolean However underestimating the potential of Record would be a mistake In this article we will delve into the depths of the Record type uncovering its versatility and demonstrating how it can be harnessed to create more powerful and expressive code Get ready to be amazed by the possibilities that Record brings to TypeScript development Understanding the Basics of Record At its core the Record type is a built in utility type in TypeScript that allows you to create an object with a known set of keys each mapped to specific value types Its syntax is quite straightforward type MyRecord Record lt KeyType ValueType gt Here KeyType represents the type of keys you want to map and ValueType represents the type of values associated with those keys This seemingly simple structure opens the door to a world of possibilities Leveraging Record for Type Safety One of the key advantages of the Record type is its ability to provide type safety when dealing with dynamic data structures like objects with varying key value pairs Suppose you are building an application that deals with user preferences and each preference has a specific data type With Record you can ensure that each preference is associated with the correct data type type UserPreferences Record lt string string number boolean gt By utilizing Record you create a structured way to define the shape of your preferences object preventing errors that might arise from incorrect data types Expressive APIs with Record Another remarkable aspect of Record lies in its capacity to define expressive APIs Consider scenarios where you need to create a dictionary like structure for managing different resources such as translations for an internationalized app With Record you can elegantly define your resource dictionary type ResourceDictionary Record lt string string gt This approach not only enhances readability but also allows for easy additions or modifications of resources Furthermore Record can be combined with other TypeScript features like mapped types and conditional types to create even more sophisticated and precise APIs Record for Advanced Data Transformations The potential of Record goes beyond simple data structures It s a powerful tool for advanced data transformations For example you can use Record in conjunction with mapped types to transform an array of objects into a dictionary like structure type TransformArrayToDictionary lt T extends id string gt Record lt T id T gt This transformation allows you to access objects directly using their unique IDs resulting in optimized data retrieval Potential PitfallWhen using the Record type in TypeScript it s important to be aware of a potential pitfall that can lead to unintended behavior and unexpected results While the Record type is powerful and versatile it has a behavior related to the assignment of properties that might catch developers off guard The issue arises from the fact that TypeScript s Record type allows any string key to be associated with a certain value type This means that you can easily assign properties to a Record object without restriction However this behavior can lead to situations where you inadvertently assign properties that might not be part of the intended data structure For example consider the following code snippet type UserPreferences Record lt string string number boolean gt const preferences UserPreferences theme dark fontSize Mistake Incorrect property name colorScheme light Oops In this example the developer might have intended to define only theme and fontSize preferences However due to the permissive nature of the Record type the assignment of the colorScheme property goes unnoticed This can lead to runtime errors or unexpected behavior when accessing or using the preferences object To mitigate this risk it s recommended to use more specific types or interfaces whenever possible rather than relying solely on the Record type By using specific types you can define a clear structure for your data objects and avoid accidental assignments of unexpected properties If you do choose to use the Record type make sure to carefully manage and document the allowed property names to prevent unintended assignments Additionally TypeScript s strict type checking can help catch such mistakes during development so ensuring that you have enabled strict mode in your TypeScript configuration is beneficial In summary while the Record type is a useful tool it s crucial to be cautious and vigilant when using it to avoid potential pitfalls related to assigning unintended properties Using more specific types or interfaces whenever possible can help enhance type safety and prevent unexpected issues in your TypeScript code Conclusion The Record type in TypeScript might seem humble at first glance but its capabilities are far reaching and impactful By leveraging Record you can enforce type safety create expressive APIs and perform complex data transformations with elegance and confidence As you continue your TypeScript journey don t overlook the power of Record it s a tool that can significantly elevate your code quality and development experience Embrace the potential of Record and explore the numerous ways it can empower your TypeScript projects to new heights 2023-08-17 14:10:02
海外TECH DEV Community Web Accessibility: A Web for Everyone by Empowering Inclusion and Equal Access for All https://dev.to/miracool/web-accessibility-a-web-for-everyone-by-empowering-inclusion-and-equal-access-for-all-3jgg Web Accessibility A Web for Everyone by Empowering Inclusion and Equal Access for AllTable of content IntroductionHistory of netizens and the webMeasuring color contrast for visually impaired usersUnderstanding the power of alternative textA practical example of using WAI ARIA label for custom component developmentUnderstanding WCAG Web Content Accessibility Guidelines and its compliance requirements IntroductionIn today s connected world the internet has shaped how we learn work communicate and access information becoming a crucial part of our daily lives The internet presents a lot of opportunities for empowerment knowledge sharing and economic development with its vast selection of websites applications and digital services However while the internet has unlocked a world of opportunities it has also unintentionally put obstacles in the way of some people excluding them from its abundant resources The concept of Web for Everyone prioritized inclusion accessibility and equal access for all users regardless of their skills backgrounds or technological resources It highlights the significance of creating web experiences that cater to the diverse needs of people with disabilities the elderly those living in areas with low bandwidth and users dealing with a range of socioeconomic challenges In this article We delve into the significance of empowering inclusion in web development and how it can contribute to an online environment that is more equitable We look at the fundamentals of accessibility as well as the tools and methods that web designers can use to create truly inclusive web experiences that make sure no one is left out of the digital revolution History of netizens and the webThe World Wide Web was created in the early s and the idea of netizens or citizens of the internet started to take shape Initially the web primarily catered to a niche group of tech enthusiasts academics and researchers Accessibility wasn t a major issue during this time because most people used desktop computers with straightforward text based user interfaces to access the internet Graphical user interfaces spread as the web gained popularity Users with disabilities however faced difficulties as a result of this transition For example image based content that lacked alternative text descriptions created barriers for the visually impaired and made it challenging for screen readers to effectively communicate information Organizations and standards bodies started pushing for a more inclusive web in response to growing accessibility concerns The World Wide Web Consortium WC launched the Web Accessibility Initiative WAI in WAI concentrated on developing policies and procedures to improve the accessibility of the web for those with disabilities The Web Content Accessibility Guidelines WCAG framework has become a vital tool for developers to use when creating accessible websites While significant progress has been made web accessibility remains an ongoing challenge The rapid evolution of technology including the Internet of Things IoT artificial intelligence AI and virtual reality VR brings new accessibility considerations to the forefront Ensuring equal access for all netizens will continue to be a vital aspect of the web s future Measuring color contrast for visually impaired usersTo ensure that digital content is readable and usable by all users including those with visual impairments color s role in accessibility particularly regarding contrast is essential The difference in luminance brightness between two colorsーtypically the color of the background and the foreground textーis referred to as contrast Regardless of a user s visual abilities a sufficient contrast ratio is necessary to make content readable and distinguishable Here is an example of how to text for contrast while building an application using Chrome DevTool Open the web page you want to analyze in Google Chrome Open Chrome DevTools by right clicking on the page and selecting Inspect or pressing the F key on Windows Linux or Cmd Option I on macOS In DevTools click on the Elements tab to inspect the HTML structure of the page Locate the element that contains the text whose color contrast you want to measure You can do this by hovering over the elements in the Elements panel to highlight them on the page Once you ve identified the element click on it in the Elements panel This will bring up the Styles section on the right hand side of DevTools showing the CSS styles applied to the element An example of a good color contrast Understanding the power of alternative textAlternative text also known as alt text is a vital component of web accessibility that improves the usability of websites for people with visual impairments Screen readers can now convey information to users who are unable to directly perceive these visual elements by using alt text which offers a text based alternative to non text content like images graphics and multimedia elements It guarantees that everyone can understand and interact with the content on a website regardless of their knowledge or skills There are numerous benefits to using a proper concise and yet descriptive alt text for images ranging from better SEO Search Engine Optimization great accessibility Compliance with WCAG Web Content Accessibility Guidelines and an awesome user experience These benefits are the benchmark for a well performing product that prioritizes inclusion However alt text can be excluded for certain images that are not important for SEO such as a landing page image This can be achieved by giving the image an empty alt value which will force a screen reader to omit this image A simple code example of an alternative text lt DOCTYPE html gt lt html gt lt head gt lt title gt Alt Text Example lt title gt lt head gt lt body gt lt h gt Mountain Landscape lt h gt lt img src mountain jpg alt Scenic view of a majestic mountain landscape with snow capped peaks and a serene lake in the foreground gt lt body gt lt html gt A practical example of using WAI ARIA label for custom component developmentLet s look at a real world example of how to improve the accessibility of a custom tabbed component using WAI ARIA Web Accessibility Initiative Accessible Rich Internet Applications attributes A common user interface element used to structure and organize content presentation is a tabbed component In this example we will be creating an accessible tab component using HTML CSS and WAI ARIA attributes to improve accessibility for screen reader users HTML Structure lt DOCTYPE html gt lt html gt lt head gt lt title gt Accessible Tabbed Component lt title gt lt link rel stylesheet type text css href styles css gt lt head gt lt body gt lt div class tabbed container gt lt button class tab role tab aria selected true aria controls tab content gt Tab lt button gt lt button class tab role tab aria selected false aria controls tab content gt Tab lt button gt lt button class tab role tab aria selected false aria controls tab content gt Tab lt button gt lt div gt lt div id tab content class tab content gt Content for Tab lt div gt lt div id tab content class tab content gt Content for Tab lt div gt lt div id tab content class tab content gt Content for Tab lt div gt lt body gt lt html gt CSS Styles tabbed container display flex justify content space between tab padding px px background color fff border none cursor pointer tab content display none margin top px tab content aria hidden false display block In this example we ve created a basic tabbed component with three tabs and corresponding content panels To enhance accessibility we ve used WAI ARIA attributes role tab Indicates that the button element serves as a tab aria selected Indicates whether a tab is currently selected true or not false aria controls Associates each tab with the corresponding content panel We ve also used aria hidden in the CSS to control the visibility of the tab content based on its selected state Understanding WCAG Web Content Accessibility Guidelines and its compliance requirementsThe Web Accessibility Initiative WAI of the World Wide Web Consortium WC created a set of guidelines known as the Web Content Accessibility Guidelines WCAG These recommendations are made to guarantee that digital content such as websites and web applications is accessible to those who have disabilities No matter a user s abilities WCAG offers a framework for producing content that is perceivable operable understandable and robust WCAG is organized into four main principles each of which is supported by specific guidelines and success criteri The principles or benchmark for a website is for them to be perceivable operable understandable and robust It also has three level of comformancy A AA and AAA are the three levels of WCAG conformance With Level A being the most fundamental and AAA being the highest level of accessibility each level builds on the prerequisites of the one before it Since it strikes a good balance between accessibility enhancements and implementation effort the AA level is frequently regarded as the ideal for the majority of websites and applications Here is a link to learn more about this guidelines from the WCAG website In conclusion web accessibility is not merely an optional feature but a fundamental necessity for creating an inclusive and equitable digital space for all As the internet becomes an increasingly integral part of our daily lives it is crucial to ensure that individuals with disabilities can participate fully and benefit from its vast resources 2023-08-17 14:01:44
Apple AppleInsider - Frontpage News Daily Deals Aug. 17: $100 off iPad Pro, Apple Pencil $89, Samsung smartphones from $149, more https://appleinsider.com/articles/23/08/17/daily-deals-aug-17-100-off-ipad-pro-apple-pencil-89-samsung-smartphones-from-149-more?utm_medium=rss Daily Deals Aug off iPad Pro Apple Pencil Samsung smartphones from moreThursday s top deals include off an iRobot Roomba j off a LG K Smart TV off an Aiper robot pool vacuum off an Ecovacs Deebot X Omni robot vacuum and more Save on a LG evo Smart TV The AppleInsider crew searches the web for unbeatable deals at ecommerce stores to showcase high quality bargains on popular tech items including deals on Apple gadgets TVs accessories and other gadgets We post our most valuable finds daily to help you stretch your dollar Read more 2023-08-17 14:54:16
Apple AppleInsider - Frontpage News 'Fake Airplane Mode' makes iPhone look offline to user, while an attacker stays connected https://appleinsider.com/articles/23/08/17/fake-airplane-mode-makes-iphone-look-offline-to-user-while-an-attacker-stays-connected?utm_medium=rss x Fake Airplane Mode x makes iPhone look offline to user while an attacker stays connectedSecurity threats can crop up at any time even on the iPhone and now Jamf Threat Labs has demonstrated that even if you think Airplane Mode is on you might be getting duped Jamf logoAt the time of publication this particular attack has not been demonstrated in the real world However the mobile tampering technique is advanced enough that in most scenarios for everyday users it would go undetected Read more 2023-08-17 14:41:21
Apple AppleInsider - Frontpage News Apple shares more details about live action Godzilla and Titans drama https://appleinsider.com/articles/23/08/17/apple-announces-live-action-godzilla-and-titans-drama?utm_medium=rss Apple shares more details about live action Godzilla and Titans dramaApple TV has revealed the first details of Monarch Legacy of Monsters a forthcoming part series starring Kurt Russell and coming as part of Legendary Entertainment s Monsterverse Monarch Legacy of Monsters Source Apple Science fiction has proved a hit for Apple TV with shows such as Foundation and also Silo the streamer s highest rating series to date It s done less well with fantasy series like See but now it s tapping into the hit Monsterverse series of movies with Monarch Legacy of Monsters Read more 2023-08-17 14:59:49
海外TECH Engadget The Xbox 360 store will close in July 2024 https://www.engadget.com/the-xbox-360-store-will-close-in-july-2024-143042377.html?src=rss The Xbox store will close in July Microsoft has revealed when the Xbox store will close its doors You ll no longer be able to buy games expansions or anything else on the Xbox console or Marketplace after July Any original Xbox or Xbox games and DLC that are backwards compatible on the Xbox One or Series X S will still be available to buy on the newer consoles storefronts The Microsoft Movies amp TV app will stop working on the console on the same date so you won t be able to use it to watch TV shows and films Any content you have bought from the Xbox store will stay in your library and you can watch it on Windows and devices Xbox One and Xbox Series X S You can also watch any titles with Movies Anywhere compatibility on that service s app and website You can still buy Xbox games and other content through the console s storefront until next July you should still be able to find second hand physical copies of games you want to play too Any games you have in your library will still work on your Xbox after the store shutters and you ll be able to access many of them on Xbox One and Xbox Series X S through backwards compatibility too Microsoft notes that it has enhanced many Xbox titles on the Series X S adding features such as FPS Boost Auto HDR and snappier loading times Multiplayer features on Xbox games will still be supported as long as publishers and developers keep their titles servers up and running You ll be able to save your games and progress to the cloud as well and pick up where you left off on Xbox One or Xbox Series X S The Xbox is years old this year and as best I can tell it s been five years since the last game was released for it It perhaps doesn t make business sense for Microsoft to keep the store open However the store s closure will prevent players from being able to buy many digital only games making the move a blow for game preservation After fans protested against Sony s plan to shut down the PlayStation and PlayStation Vita stores in the company relented and kept them open though it followed through on closing the PSP store On the other hand Sony is making players jump through a few extra hoops to buy PS and Vita games as neither digital storefront directly accepts credit cards debit cards or PayPal payments In Sony set up a game preservation team This article originally appeared on Engadget at 2023-08-17 14:30:42
海外TECH CodeProject Latest Articles IntelliFile - An Alternative Windows Version to the Famous Total Commander https://www.codeproject.com/Articles/5331868/IntelliFile-An-Alternative-Windows-Version-to-the IntelliFile An Alternative Windows Version to the Famous Total CommanderThis article is about the IntelliFile application which is a free alternative Windows version to Total Commander and uses many components that have been published on CodeProject 2023-08-17 15:00:00
海外科学 NYT > Science As Dolphins Die in Black Sea, Ukraine Builds Case for Ecocide Against Russia https://www.nytimes.com/2023/08/17/world/europe/russia-war-dolphin-deaths-ukraine.html As Dolphins Die in Black Sea Ukraine Builds Case for Ecocide Against RussiaThe animals are dying in droves in the Black Sea and Ukrainian officials are documenting the deaths hoping to prosecute Russia for the war s ecological toll 2023-08-17 14:18:06
海外TECH WIRED The Best Mattresses You Can Buy Online (2023) https://www.wired.com/gallery/best-mattresses/ organic 2023-08-17 14:28:29
ニュース BBC News - Home Saudi crown prince Mohammed bin Salman invited to visit UK https://www.bbc.co.uk/news/uk-politics-66531007?at_medium=RSS&at_campaign=KARANGA jamal 2023-08-17 14:26:43
IT 週刊アスキー 『ウマ娘』がファミリーマートとコラボ再び!「2.5周年記念サマーキャンペーン」8月22日から開催 https://weekly.ascii.jp/elem/000/004/150/4150378/ cygames 2023-08-17 23:25: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件)