投稿時間:2022-03-28 23:40:45 RSSフィード2022-03-28 23:00 分まとめ(43件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Samsung、「iMac」に似たデザインのWi-Fi内蔵4K液晶ディスプレイ「Smart Monitor M8」を発表 https://taisy0.com/2022/03/28/155231.html apple 2022-03-28 13:37:54
AWS AWS Architecture Blog Selecting the right database and database migration plan for your workloads https://aws.amazon.com/blogs/architecture/selecting-the-right-database-and-database-migration-plan-for-your-workloads/ Selecting the right database and database migration plan for your workloadsThere has been a tectonic shift in the approach to hosting enterprise workloads Companies are rapidly moving from on premises data centers to cloud based services The driving factor has been the ability to innovate faster on the cloud Your transition to cloud can be straightforward but it does go beyond the usual lift and shift approach To start … 2022-03-28 13:58:30
AWS AWS Government, Education, and Nonprofits Blog How governments can use open source solutions for faster transformation and more https://aws.amazon.com/blogs/publicsector/how-government-use-open-source-solutions-faster-transformation-more/ How governments can use open source solutions for faster transformation and moreIn my time working for the UK government s Digital Marketplace as the service manager I saw first hand the benefits of open source in government Combined with transparent processes using open source solutions helped streamline digital project execution build trust with constituents and the global community and save time and money Now as the senior manager of government services GovServices at AWS and as a teacher for the AWS Institute Executive Education Program I want to share best practices for government leaders looking to use open source solutions 2022-03-28 13:30:18
python Pythonタグが付けられた新着投稿 - Qiita PyPyで作ったプログラムをcffiでexe化する方法 https://qiita.com/Moyashi-itame/items/e674b017b046772ad3e7 必要なディレクトリをすべてコピペしましょうexe化したファイルでTkinterを使うtestpyを以下のようなファイルに変更しました。 2022-03-28 22:33:01
python Pythonタグが付けられた新着投稿 - Qiita Web上のHTMLからPython Notebookを自動生成してみた https://qiita.com/ozora/items/31a0fa3feeb93af49cd3 Web上のHTMLからPythonNotebookを自動生成してみた初めにGitHubのREADME記載のExampleとかをNotebookで実行したことがちまちまあります。 2022-03-28 22:24:37
Ruby Rubyタグが付けられた新着投稿 - Qiita Railsでアプリ作成時に、使用可能なバージョンを確認する方法 https://qiita.com/kuramoto30/items/280299e8bf85026bb6cd gemlistrails 2022-03-28 22:57:43
Git Gitタグが付けられた新着投稿 - Qiita Railsでアプリ作成時に、使用可能なバージョンを確認する方法 https://qiita.com/kuramoto30/items/280299e8bf85026bb6cd gemlistrails 2022-03-28 22:57:43
Ruby Railsタグが付けられた新着投稿 - Qiita Railsでアプリ作成時に、使用可能なバージョンを確認する方法 https://qiita.com/kuramoto30/items/280299e8bf85026bb6cd gemlistrails 2022-03-28 22:57:43
Ruby Railsタグが付けられた新着投稿 - Qiita rails_tutorial chapter11 <忘備録> https://qiita.com/2016asap/items/b7d7b6c7a98ecbe39743 editaccountactivationurluseractivationtokenemailuseremailこのようにして名前付きルートでクエリパラメータを定義すると、Railsが特殊な文字を自動的にエスケープしてくれます。 2022-03-28 22:43:22
技術ブログ Developers.IO 期待値調整におけるギャップとシステムの不具合解消の対比 https://dev.classmethod.jp/articles/expectation-gap/ 調整 2022-03-28 13:58:07
技術ブログ Developers.IO AWS再入門ブログリレー2022 Amazon DynamoDB編 https://dev.classmethod.jp/articles/re-introduction-2022-dynamodb/ amazondynamodb 2022-03-28 13:29:51
海外TECH MakeUseOf How to Thoroughly Explore Your Career Options: 6-Step Guide https://www.makeuseof.com/how-to-explore-career-options/ How to Thoroughly Explore Your Career Options Step GuideCareer decisions can be daunting but with the right plan for exploring your options you will be able to make the right choice Here s how 2022-03-28 13:45:13
海外TECH MakeUseOf Why You Shouldn't Wear Earphones All Day https://www.makeuseof.com/why-you-shouldnt-wear-earphones-all-day/ shouldn 2022-03-28 13:30:13
海外TECH MakeUseOf KeyTips in Microsoft Office: What They Are and How to Use Them https://www.makeuseof.com/keytips-microsoft-office-how-to-use/ KeyTips in Microsoft Office What They Are and How to Use ThemKeyTips are keyboard shortcuts for using the functions in the ribbon menu in Microsoft Office applications Here s how to use them effectively 2022-03-28 13:15:13
海外TECH MakeUseOf Obsbot Tiny 4K PTK Webcam Follows Your Every Move and Looks Great https://www.makeuseof.com/obsbot-tiny-4k-review-ai-tracking-webcam/ Obsbot Tiny K PTK Webcam Follows Your Every Move and Looks GreatWith gesture controlled tracking and superb K image quality the Obsbot Tiny is sure to elevate your remote meetings and desktop vlogging 2022-03-28 13:05:13
海外TECH DEV Community How to schedule tasks in more than 30 days in Google Cloud Tasks API? https://dev.to/frenchcooc/how-to-schedule-tasks-in-more-than-30-days-in-google-cloud-tasks-api-35f How to schedule tasks in more than days in Google Cloud Tasks API At Mailmeteor we rely heavily on Google Cloud Tasks to send emails In fact each time we send an email there s one or more Cloud Tasks associated to it That s a lot of tasks in the end While Google s product is really robust one thing that has always being tricky is that you can t schedule a task that will run in more than days ResourceValueDescriptionMax task retention daysThe time between when a task is added to a queue and when it is automatically deleted Extract from Google Cloud Tasks documentation on quotas amp limitsIt is still way more than what AWS proposes AWS SQS Simple Queue Service lets you queue messages for up to minutes Nevertheless there are so many use cases when having a very long tasks scheduler is needed While I wasn t sure why Google has limited the execution delay to a month one of their employee has explained on StackOverflow that such limit is a design decision Google does not charge for the storage space of tasks so extending that would detrimental to our costs source Though Google Cloud Tasks is already a paid product So extending the date whether you need to pay for it or not wouldn t be that much of an issue for them In fact according to this StackOverflow thread more than people have been interested in extending the task delay And there s already a feature request back from which I urge you to star to make sure Google prioritizes this Too much talking Let s see how we can keep using Google Cloud Tasks and extend the execution delay to infinity and beyond SolutionThe trick is in adding an ETA header to your tasks This way before executing the task you can check if the ETA is now and thus execute the task or in the future and thus re schedule the task This way you can recursively keep creating tasks and eventually execute your task at your desired time Let s take an example I have a task to run in daysI create a new task with the max execution time days Then days later the task executes but it s too early so I reschedule it in days days later days in total the task executes normally In fact doing so let s you create tasks in year or more from now Implementation JS In Express js all you need is a middleware that will check if the execution time is in the future and if so will reschedule the tasks Middleware to reschedule Google Cloud Tasksexport const googleTasksScheduleMiddleware async req res next gt const taskETAHeader req headers google cloud tasks eta If no header skip middleware if taskETAHeader null taskETAHeader next return const now Date now const margin now TASK DELAY MINUTE const intHeader parseInt taskETAHeader Time has passed let s process the task now if intHeader lt now next return It s too early Reschedule the task else Construct the task createTask req method req url req headers req body response send Re scheduled return Then add your middle before the first routes of your application app use googleTasksScheduleMiddleware ConclusionAs you can see it s pretty easy to implement and doesn t require refactoring your application If you are interested in more engineering articles from Mailmeteor make sure to follow my account 2022-03-28 13:40:55
海外TECH DEV Community Do you think that we need another go like language ? https://dev.to/saptakbhoumik/do-you-think-that-we-need-another-go-like-language--2138 features 2022-03-28 13:40:19
海外TECH DEV Community How to password protect any website? https://dev.to/khokon/how-to-password-protect-any-website-2ej7 How to password protect any website Your browser is the new treasury of your personal data Especially sites like google photos email etc And there is no wonder that we share our devices with people close to us Even if we have to share the device with someone it s not necessary to share the personal data it holds When it comes to social media sites you simply can just log out of the site and make sure no one can sneak around your social media while using your device But what about services you don t want to log out of but rather have another safety layer In such a case we can password protect websites in our browser So no unwanted people can have access to the websites we don t want them to Luckily we have a solution for this particular problem Let s jump into the content yey Web LockWe lock is password protection for websites just like the app lock we use on mobile devices Except this is a browser extension You can get the extension from the chrome web store which supports all chromium based browsers like Microsoft Edge Brave Vivaldi etc So if you re using one of them you can simply install the extension from here The extension will soon be available for other browsers like Firefox as well Setup PasswordAfter you ve installed the extension successfully click on the extension icon from your browser and it will open a password setup page Like the screenshot below img alt Web lock password setup screen lt br gt height src www blogdesire com wp content uploads Screenshot png Fw D ssl D width On the first box type your email address this email will be used to reset your password if you ever forget it But hopefully you won t The next two boxes are for passwords you have to type the same password on both boxes Once you ve set up the password you ll be asked to log in using your password Protect WebsitesOnce you ve logged in to the extension dashboard you ll see a screen like this All you need to do now is enter your desired website s URL in the box and press enter For example I can put in the box to protect my site from unwanted visitors as I have admin access to the site So next time someone tries to visit blogdesire com from my browser they will be asked to enter a password before they can access the site Just like this That s it I hope you found the article helpful If you re having any issues with the extension or with the article you can just let me know in the comment section Thanks 2022-03-28 13:37:06
海外TECH DEV Community Dictionary implementation in C# https://dev.to/wojciechowskapaula/dictionary-implementation-in-c-50j1 Dictionary implementation in C In the previous post we explained the implementation details of List lt T gt This time we will look at another generic collection defined in System Collection Generic namespace which is Dictionary lt TKey TValue gt ImplementationThe most important implementation elements of the Dictionary lt TKey TValue gt buckets set of elements with similar hashes entries elements of the Dictionary lt TKey TValue gt freeList index of the first free placefreeCount the number of empty spaces in the array not at the endcount the number of elements that are currently in the Dictionary lt TKey TValue gt version changes as the Dictionary lt TKey TValue gt is modified and a few more equally important elements that Entry contains key key to identify element with TKey type value value of an element with TValue type hashCode numeric value used to identify an object in hash based collection next describes the next item in the bucketThe dictionary uses an array of Entry structures to store data To get a better understanding of how this really works you need to know what exactly a hash table is Hash table also called hash map is a data structure that implements an associative array which allows you to store pairs each pair contains a key and a value With the key we are able to quickly find the value associated with the key According to the dictionary s equality comparer the key is unique within the entire associative array In NET the hash table contains a list of buckets to store values A hash table uses a hash function to compute an index based on the key This allows us for example to find the correct bucket with the value we are looking for The same is the situation with other operations by calculating the hashcode we can add an element to the appropriate bucket with the index designated for it We will continue to explain this in more detail later in this post The value in the bucket indicates the index in entries As it is in infographic a value of points to index And a value of points to index The next property points to the next item that is in the same bucket In the picture it is additionally marked with an arrow When next is equal to it means that it is the last item in the bucket Adding an item when the key doesn t existIn the previous section we mentioned that the key must be unique Now let s look at an example in which we want to add a new Entry to our list When the key doesn t exist and we have one free space not at the end of the array The first operation in this case is to compute hashcode and find a suitable bucket using the formula hashCode buckets Length When we find this bucket we compare hashCode of the new element we want to add to the array with the hashCode of the first Entry then move on to the next one pointed to by next and repeat the comparison If none of the existing hashCodes are the same then we add a new element to the first empty space Our version grows and the value of bucket points to the last added element If the modulo result points to a bucket that already contains an item we call this situation a hash collision after adding a new element its index from the entries array is set to the value of bucket and the next field is set to point to the previous item resulting in a chain of items ️ Adding an item when the key existLet s look at the case where we want to change the value of an existing Entry In the first steps nothing changes from the previous example we calculate the hashCode and find the appropriate bucket After that the hashCodes of the elements in the buckets are compared When we have verified that the hashCode of the new Entry is the same as the existing one keys comparision occurs If the keys are the same value is overwritten and the version is incremented by It s so simple and interesting at the same time ResizeLet s look at another interesting situation If we want to add an element to the dictionary and there is no more space in it before this operation we should resize the array The first step is to create an empty enlarged array whose size is equal to the nearest Prime Number of doubled the initial size of the array We use Prime Numbers to minimalize probability of hash collisions The next step is to copy the entries and calculate the hashcode for the new element and find the right bucket Then as in the previous examples add the element to the first free spot of the entries array RemoveWe ve already learned how adding elements to the dictionary looks like it s high time to know the implementation details of removing them The initial steps remain the same the hashCode is calculated and the appropriate bucket is found Then a comparison of hashCodes takes place and a check is made to see if the keys are the same After that the key is removed and the version grows When an element from the array is removed the space it occupies goes into the chain freelist The Dictionary stores the index of the next element using the next property of the Entry structure This way we know in case we want to add a new element after deletion which space it will occupy first entry and when adding one more element in turn entry If you enjoyed this post and want to keep learning more check out our social channelsTwitterDiscordInstagram Sources 2022-03-28 13:29:17
海外TECH DEV Community Phone Number Normalisation https://dev.to/bornfightcompany/phone-number-normalisation-4gpi Phone Number Normalisation The phone number normalisation is used to translate a phone number into a standard form For example there is E international standard which defines format as country code subscriber number including area code and can have a maximum of fifteen digits However we rarely save numbers especially domestic ones in this exact format This can be a huge problem if you wanted to allow your users to import their mobile phone contacts into your application The users can have the phone number in their phone contacts entered with or without country code or can enter country codes like or etc So if you didn t have the phone number normalisation these two numbers and would be imported as two different phone numbers for the same contact even though when calling they are the same just written in different format standards We have a similar challenge on one of our projects so our first step was to research what should be covered and what others cover when they do the phone number normalisation One of my outputs were the test cases that are covered by Whatsapp I can t contact a foreign mobile number without a country code For example if your phone number is from Croatia and you saved a contact with a mobile phone number from Austria without the country code Whatsapp will not recognize it as existing I can contact domestic mobile number without country code For example if your phone number is from Croatia and you saved a contact with a mobile phone number from Croatia without the country code Whatsapp will recognize it as it is existing I can contact a foreign mobile number with country code For example if your phone number is from Croatia and you saved a contact with a mobile phone number from Austria with the country code standard Whatsapp will recognize it as existing I can contact a foreign mobile number with a country code For example if your phone number is from Croatia and you saved a contact with a mobile phone number from Austria with the country code standard Whatsapp will recognize it I can contact a foreign mobile number with country code and before the mobile prefix For example save the foreign phone number in your contacts with country code and zero before the mobile operator prefix Whatsapp will recognize and normalise the number to I can t contact a foreign mobile number with country code and before mobile prefix For example save the foreign phone number in your contacts with country code and zero before mobile prefix Whatsapp will not recognize the number as the same as I can t contact domestic mobile number with country code and before mobile prefix For example save the domestic phone number in your contacts with country code and zero before mobile prefix Whatsapp will not recognize the number as the same as Handling phone numbers especially without normalisation can create a real mess in your application because many users in different countries use different phone number standards to create their contacts Feel free to share your experience and your test case examples in the comments section 2022-03-28 13:16:42
海外TECH DEV Community out & ref | C# https://dev.to/wahidd/out-ref-c-21di out amp ref C refqiymatlarni reference orqali jo natadi yoki qaytaradiref orqali jo natilgan o zgaruvchilar avvaldan initialize qilingan bo lishi shart outref bilan deyarli bir xil out orqali jo natilgan parameterlar initialize qilinishi shart emas lekin method qaytishidan avval initialize bo lshi shart out amp ref ishlatish mumkin emasasync keyword orqali yaratilgan asinxron methodlarda ishlatilmaydiyield return va yield break keywordlar mavjud methodlarda ishlatilmaydiout extension methodlarning birinchi argument ustida ishlatilmaydiref extension methodlarning birinchi argumenti struct bo lmasa yoki struct constraint mavjud bo lmasa ularni ustida ishlatib bo lmaydi 2022-03-28 13:15:23
海外TECH DEV Community One weird trick for sampling EventBridge events https://dev.to/aws-builders/one-weird-trick-for-sampling-eventbridge-events-mlp One weird trick for sampling EventBridge eventsAmazon EventBridge is a serverless event bus and a key component of serverless event driven applications However it can be difficult to construct example event data for testing environments and developing against mock events can be limiting You may also wish to perform some continuous testing against production events but the volume of events may make this infeasible For all of these reasons it would be great to be able to sample a random portion of events from a production eventbus Unfortunately there is no native functionality to do this but it can be approximated using this one weird trick The trickIt has been possible to match events based on complex content patterns since early EventBridge events also always include an id field which is in a uuid format We can create a rule which approximates a given sampling percentage using these two properties Each character in the id field can be one of values f hexadecimal values This means that we can set the EventPattern to id prefix This should match th or of our events We can increase the granularity by increasing the number of digits that we match on A prefix consisting of two characters will match of events and a prefix consisting of three characters will match of events For example if we want to match of events we can give a list of prefixes such as id prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix prefix Note There s no guarantee that the uuids generated by EventBridge are uniformly distributed but for most purposes it should be sufficient We can build in logic for generating these prefix lists into a CDK construct The SamplingRule construct code All example code can be found in this GitHub repository rogerchi cdk events samplingThere is currently an open issue in the AWS CDK repository for defining content based matchers in an EventBridge Rule so for our construct we will need to use an escape hatch and drop down to the underlying L CloudFormation construct to set the patterns import RuleProps Rule CfnRule from aws cdk lib aws events import Construct from constructs export interface SamplingRuleProps extends RuleProps percentage number export class SamplingRule extends Rule constructor scope Construct id string percentage props SamplingRuleProps Construct the base class with a dummy eventPattern super scope id props eventPattern version Escape hatch for getting the CfnRule to be able to use content based filtering until this issue is resolved const cfnRule this node defaultChild as CfnRule const idPattern this getIdPatternFromPercentage percentage if props eventPattern cfnRule eventPattern id idPattern else cfnRule eventPattern props eventPattern id idPattern Convert percentage into list of uuid prefix patterns private getIdPatternFromPercentage percentage number prefix string if percentage gt percentage lt throw new Error Percentage must be between and Get the first three significant hex digits from the percentage const hexString percentage toString slice slice Build up list of prefixes starting from most significant digit let prefixes string let a for a x a lt parseInt hexString a prefixes push a toString let b for b x b lt parseInt hexString b prefixes push a toString b toString let c for c x c lt parseInt hexString c prefixes push a toString b toString c toString return prefixes map prefix gt prefix Use casesHere are some use cases for sampling production events Sending a portion of real events to QA Test and Dev accounts for more reliable real world tests and developing with real events Could first target a Lambda function that anonymizes certain keys in the payload to remove sensitive information Sending a portion of real events to a continuous end to end testing environmentContinuously spot checking a sample of real events to ensure that they are conforming to published schemas Testing code The example repo has a CDK application set up to create a few stacks a production eventbus stack a development eventbus stack and a stack that configures event replication from the production eventbus to the development eventbus using a sampling percentage of We deploy the CDK application to our sandbox account and invoke the scripts put events ts script to put events on our production eventbus We should expect the sampling rule to match around of these events and replicate them into our development stack of course the development stacks could live in separate development accounts as well ts node scripts put events ts prodEventBusName We check CloudWatch metrics for our event buses and we can see that of our events were sampled and sent to our dev eventbus ConclusionMy hope is that you will be able to use the SamplingRule construct pattern to help accelerate your serverless and event driven application development Please let me know if this was helpful and consider following me on Twitter scythide About meI am a Staff Engineer Veho We recently raised our Series A and B funding rounds and are actively hiring If you are passionate about serverless or even looking to grow your skills have a look at our open positions 2022-03-28 13:13:28
海外TECH DEV Community Tips Before Moving Laravel App to Production https://dev.to/morcosgad/tips-before-moving-laravel-app-to-production-5c5n Tips Before Moving Laravel App to ProductionI found this great resource that shows some great tips from Tips and Reminders Before Moving a Laravel App to Production and of course I wanted to share these tips with you Use npm run prod to make your js file smallerUse to make your photos smaller and better qualitymake sure there is Check the meta tag for the graph use Make sure your site is working properly on all browsers and mobile devices Website analytics Manage Your DNS Records Make sure you have multiple database backups Make sure you have some kind of uptime monitoring for your site I tried to present some basic points but to go deeper visit the source I hope you enjoyed with me and I adore you who search for everything new 2022-03-28 13:12:17
海外TECH DEV Community Enhance Your LinkedIn Profile https://dev.to/tmchuynh/enhance-your-linkedin-profile-245n Enhance Your LinkedIn Profile Table of ContentsThe photosThe headlineContact InformationCustomized URLYour NetworkDon t sound desperateSound approachableThe war on buzzwordsMedia elementsEndorsementsFollow othersSkill assessmentsRecommendationsLinkedIn Learning Choosing the right photosYour profile picture is your calling card It s your first impression Make sure the picture is recent looks like you your face takes up around of the frame you re wearing what you d wear to work and you re smiling Next your background photo is the section visual element on your profile page It grabs people s attention and adds more of your personality to the page The right background will help your page stand out Make your headline more than a job titleUse the headline field to say a bit more about how you see your role why you do what you do and what makes you tick Add Update your contact informationMake sure your professional email phone number website social media platforms etc are listed on your profile Create a customized URLA custom URL makes it easier to send your profile to people It also means you no longer have to worry about someone not being able to find you For the most professional URL try If that isn t available add your middle initial or industry To do this Go to your profileClick edit public profile amp URL on the right hand side it will open a new tab Click the pen icon under Edit your custom URL Grow your networkGet into the habit of following up meetings and conversations with LinkedIn connection requests This also means being active Activity on LinkedIn raises your score in algorithmic search results You are able to join up to groups on LinkedIn and when you do you are now in connection with all the group members of these groups This enables your profile to show up in exponentially more search results Don t sound desperate Actively seeking opportunities is not a good look for a job seeker Read why from a LinkedIn job seeker coach People want to hire someone who is demand Indicate your value not your needs Plus your headline on LinkedIn is prime real estate with only characters It carries the most weight with your search terms so use them carefully Sound approachableWhile retaining your professionalism in your industry you need to sound like someone recruiters hiring managers clients etc want to meet and talk to Short paragraphs with easily digestible words are always a better choice Declare war on buzzwordsWords like leadership strategic passionate expert creative innovative and specialized are over used Simply using these words won t convince people you have these qualities but you need to demonstrate them as well See The Most Overused LinkedIn Profile Buzzwords Embed media elementsAdd media such as documents video images and audio to keep the readers scrolling down your profile Make sure the chosen content supports your image and brand in a positive manner Spread the endorsement loveGo through your network and identify connections you feel genuinely deserve an endorsement from you That s often the trigger for people to return the favor Don t be afraid to reach out with a polite message asking for endorsement for a few key skills as well Check out How to Get Endorsements on LinkedIn Follow the right peopleLinkedIn allows you to keep up with people in your industry alongside successful people who inspire you This way your feed will be filled with content that is relevant to you Take skills assessmentsData shows that candidates with verified skills are around more likely to be hired for roles they apply for by displaying proof of your abilities Request recommendationsA personal testimonial written illustrates other s experience working with you Take the time to think about who you would most value a recommendation from and personalize your request s Showcase your passion for learningWhen you complete a course on LinkedIn Learning you ll have the opportunity to add a course certificate to your profile Helpful Links LinkedIn Profile Tips from Summary amp Headline to ImagesHow To Improve Your LinkedIn Profile Exactly how to improve your LinkedIn profile to get more job offersLinkedIn Profile Tips From a “LinkedIn Millionaire ConclusionI hope this article helped you out Happy coding 2022-03-28 13:11:54
海外TECH DEV Community Native lazy-loading - Why doesn't the video element have it? https://dev.to/robole/native-lazy-loading-why-doesnt-the-video-element-have-it-4ono Native lazy loading Why doesn x t the video element have it Lazy loading is a strategy to identify resources that are not critical for the initial page load and load them only when needed It s a way to shorten the length of the critical rendering path which translates into reduced page load times It leads to faster websites We have the ability to lazy load images and iframes in browsers now via the loading attribute lt img src cat jpg alt felix the cat loading lazy gt lt iframe src video player html title loading lazy gt lt iframe gt Support for lazy loading is good Lazy loading of images is supported by all major browsers now However it is still a bit patchy for iframes Firefox does not support lazy loading of iframes and it is currently under an experimental flag in Safari So we are gettting there It just made me wonder why the video element has been overlooked Is it because most videos live on YouTube now and are embedded on websites via iframes I don t know but I certainly hope not When writing an article recently I had a short screen recording to demo some functionality I wanted to include it as autoplaying video similar to where you might use an animated GIF That s when I realised there is no native lazy loading for videos This nudged me towards converting the video into a WebP instead Did you know that WebP supports animation the same as a GIF but with better compression You can use an online video to WEBP converter for this task I didn t dig that deeply into this topic as it was a bit of tangent from what I was doing However I did read a recent enough article late by Google Devs on this topic aptly titled Lazy loading video They describe distinct use cases for embedding videos that are handled differently Let s take a look at these to understand the topic better Use Case Videos where playback is initiated by the userYou have controls on the video and it up the user to play the video You can specify the preload attribute on the video element to control loading By providing preload none the browser should be prevented from loading the video data lt disable preloading gt lt video controls preload none width poster img cover jpg gt lt source src files sample mp type video mp gt lt video gt Do not include the autoplay attribute here as that may load the video disregarding preload none The browser default behaviors with regard to preload are not set in stone so being explicit with this is probably a good idea anyway On some browsers the video will be have no background You can make it look better by using the poster attribute to show a preview image When the user clicks the play button of the video then the video will be loaded Use Case A video acting as an animated GIF replacementThis was my use case I wanted to showGoogle recommends using a lazy loading library such vanilla lazyload or you can write your own JavaScript code To write your own code is not too long In the HTML you do not put src attributes on the source elements instead you stash the video URL in the data src attribute We mark video with a lazy class lt video class lazy autoplay muted loop playsinline width height poster cover jpg gt lt source data src screen recording webm type video webm gt lt source data src screen recording mp type video mp gt lt video gt The JavaScript code uses the IntersectionObserver API to detect when the video element with the lazy class comes into view and adds a src attribute to each source element with the video URL document addEventListener DOMContentLoaded function var lazyVideos slice call document querySelectorAll video lazy if IntersectionObserver in window var lazyVideoObserver new IntersectionObserver function entries observer entries forEach function video if video isIntersecting for var source in video target children var videoSource video target children source if typeof videoSource tagName string amp amp videoSource tagName SOURCE videoSource src videoSource dataset src video target load video target classList remove lazy lazyVideoObserver unobserve video target lazyVideos forEach function lazyVideo lazyVideoObserver observe lazyVideo Do you always want to do this for videos It looks to me like the addition of thelazy attribute would be great for this use case Where is the suggestion box 2022-03-28 13:09:43
海外TECH DEV Community How many programming languages do you regularly switch between? https://dev.to/sherrydays/how-many-programming-languages-do-you-regularly-switch-between-10ae habits 2022-03-28 13:08:54
海外TECH DEV Community 4 Core things to always do when cleaning your data for predictive models. https://dev.to/comejoinfolks/4-core-things-to-always-do-when-cleaning-your-data-for-predictive-models-5g0k Core things to always do when cleaning your data for predictive models IntroductionIt s always vital to know what to do while cleaning data so that you can get correct insights from it Data that isn t accurately cleansed for analysis can produce false results as well as prevent your model from generalizing properly when tested with new data In this article we ll go through the four things you should do every time you clean data so it s ready for analysis and predictions Let s get this party started PrerequisiteMake sure you have your environment set up i e you must have a jupyter notebook Have pandas library installed on your notebook Have Seaborn library installed on your notebook Have Numpy library installed on your notebook What is Data Cleansing The process of finding and fixing inaccurate data from a dataset or data source is known as data cleaning In simple terms it refers to the process of preparing your data for exploratory data analysis EDA Now that we ve understood what data cleaning entails we can begin working on the four items necessary to prepare the data for EDA So due to proprietary issues I won t be able to disclose the datasets that we ll be utilizing in this article but I ll provide screenshots so we can see what s going on These are the four things to do when you want to clean your data for analysis and predictions Note make sure you have imported these two libraries into your environment import pandas as pdimport seaborn as snsimport numpy as np Dealing with missing valuesThe first thing as a data scientist analyst is to always check the info of your data for missing values To do this type the following codedf pd read csv file path Input the filepathdf info In the case of my file this is my screenshot We can see from the above image the annotation part that we have entries Now looking at the columns features in the dataframe we can see obviously that we have missing values The next thing for us is to deal with those missing values Now this is where the question comes How can we deal with missing values When it comes to data that isn t Time Series I will talk about that in another article There are two ways to go about it Dropping the values Imputation Dropping valuesThe only time you should drop values in a dataframe is if more than of the observations are missing So if you review the dataframe and discover that of the data is missing it may be wise to drop the column with that missing value if you think it is unnecessary If you want to drop those observations you can typeAnother thing to consider is if you re building a model to predict something and you discover that the target column  i e this is the column you want to forecast has missing values You must remove all missing values from the target column which will have an impact on other columns as well So in our case now our target column price usd per m has missing values so we have to drop those values To do that we have to type df dropna subset price usd per m inplace True Now let s check the info of our data frame df info We can now observe that our dataframe has shrunk from to entries However as you can see there are still some missing values Now let s have a look at the two criteria for dealing with missing data We can see that the first criteria Dropping values applies to some of our columns which are floor and expenses the best thing to do is to drop those columns away though it is not advisable to drop the floor column bit for the case article we ll have to drop it df drop columns floor expenses inplace True We can see that we still have some missing values but they are not up to so we move to the other types of dealing with missing values ImputationWhen it comes to the imputation of missing data the most common method is to use the mean value of all the total values in the column However there are several guidelines for when you should not use  mean which I will outline below They are as follows If your column contains values with different variances such as positive and negative numbers you should not utilize mean If your column contains just binary values of s and s you should avoid using the mean approach If your columns as the following features it is advisable to drop those observations Note don t confuse observation with a column Observation means row so if you want to drop rows you make use of the following codedf dropna subset inplace True As previously stated this approach does not work with time series data It has a different approach to dealing with missing values which I ll cover in a later article Also note it is always advisable to fill a column that has numeric missing values such as float and integer Now back to our dataset since our dataset does not have the above criteria I m going to use the mean approach and I have only numeric column which is room that has missing values So I m going to fill it with the mean value of the total values To do that type the below code df fillna np mean df rooms inplace True Now that we don t have numerical columns that have missing values we are good to go Checking for MulticollinearityMulticollinearity is a statistical concept in which independent variables in a feature matrix which includes all variables in the dataframe except the target variable are correlated Now that we ve understood what multicollinearity is Let s check it out Back to our dataframe since price aprox usd is our target value we are going to copy drop it what this means is I m going to pass in the drop attribute without using inplace parameter so it will return a copy of it So to see the multicollinearity type this df drop columns price aprox usd corr Notice that I didn t pass in inplace so it returns a copy of the data frame without price usd per m and also notice the corr attribute it is used to find the correlation After you run the above you should have something like this Now that we ve seen the correlation numerically it will be nice to visualize so we can know what s going on So we will be using seaborn Just save the above code into a variable vis corr Check below to see what I mean vis corr df drop columns price aprox usd corr Now to visualize it we will use seaborn just type the following code to see the visualization sns heatmap vis corr So let s unpack what s going on here The diagram above shows the level of correlation among different features in the dataframe However if we have features in which their correlation value is greater than it means those features are highly correlated with one another Now that we ve understood that we can see that price price aprox local currency are correlated with one another Also surface total in m and surface covered in m are also very correlated So we have to drop one of those features The issue now is how do we know which feature to drop now that we ve noticed the concerns with multicollinearity in our dataframe To figure out which feature to eliminate we ll need to look at the association between each of these features and our target variable After we ve done that then the feature with the highest correlation value will be the one to be dropped Please see the code below to understand what I m saying and I ll also include the correlation value for each variable as a comment df price corr df price aprox usd corr value df price aprox local currency corr df price aprox usd corr value df surface covered in m corr df price aprox usd corr value df surface total in m corr df price aprox usd corr value Okay now that we ve seen the correlation values of all the features so the features that have to be dropped are price aprox local currency and surface covered in m I will be dropping surface covered in m rather than surface total in m I feel like the adjective total makes it have more information well So to speak there might be sometimes in which you have to go for the one which has the lowest value But based on my preference I choose to drop surface covered in mSo to do that we have to typedf drop columns price aprox local currency surface covered in m inplace True Okay so having done that we are good to go Let us look at another core thing we need to look at Dealing with leaky featuresTo understand what leaky features are Consider the following scenario you were scheduled to take an exam for which you had not prepared but you were fortunate enough to see the answers to the exam questions before entering the room How will you perform as opposed to you didn t see the answers at all You will pass all the exams right That is what leaky features are also They re features that fool the model into thinking it s some kind of geek who can predict anything unusual while when it comes to predicting data that hasn t been seen before the model will completely fail So back to our dataframe let s check maybe we have any leaky features in our data frame df info So in our dataframe we can see that we have leaky features in it Our leaky features are the price price usd per m price per m We can see that these features are cheats to our dataframe considering that we want to build a model that can predict house prices It will be very stupid to have prices columns again in our dataframe These columns are cheats to our target variable which is price aprox usd We have to drop them from our dataframe df drop columns price usd per m price per m inplace True Now that we are done we are good to go So let s look at the last core thing we need to focus on when building a predictive model Dropping high and low cardinality categorical variables A cardinality categorical variable e g places names emails etc is said to be low or high when it has few or many unique numbers of value So for us to be able to check the cardinality of our categorical variable which are most types of object datatype We will use the following code df select dtypes O nunique After running the code we can see that we have low and high cardinality variable which are operation and properati url So we have to drop them The essence of dropping the cardinality variable is that it will cause insanity in our model which we don t want df drop columns operation properati url inplace True ConclusionSo we have gotten to the end of our journey there are still other core things to look at when cleaning the data like dealing with outliers and other kinds of stuff Thank you for reading I m open to suggestions feedback and where I need to improve on the article You can follow me for more articles Thanks 2022-03-28 13:08:46
Apple AppleInsider - Frontpage News Top 6 Amazon deals for the week of March 28: AirPods, Mac mini, TurboTax & more on sale https://appleinsider.com/articles/22/03/28/top-5-amazon-deals-for-the-week-of-march-28-airpods-mac-mini-turbotax-more-on-sale?utm_medium=rss Top Amazon deals for the week of March AirPods Mac mini TurboTax amp more on saleWeekly deals on Apple products high end audio equipment gaming gear and even tax software are going on now at Amazon with cash discounts of up to off We ve rounded up our favorites on March Save on Apple AirPods TurboTax software for Mac and audio equipmentBargain hunters can check out Amazon s daily deals on this dedicated sale page but we re highlighting our own top picks below Read more 2022-03-28 13:39:31
海外TECH Engadget OnePlus as we knew it is dead, here's what next https://www.engadget.com/one-plus-as-we-knew-it-is-dead-heres-what-next-133017093.html?src=rss OnePlus as we knew it is dead here x s what nextOnePlus began life as a startup making smartphones with high end specs aimed at enthusiasts Its first phones were barebones devices that maximized value for money while still retaining a sense of identity remember those sandstone backs That s something that s not easy for any device regardless of price But now after generations it feels like the OnePlus we knew is gone and it s probably not coming back Now I don t mean to be all doom and gloom It s only natural that companies evolve over time Just look at Nintendo which started out making Hanafuda cards more than years ago or Nokia which can trace its roots back to a single pulp mill built way back in So while OnePlus hasn t been around nearly that long and its pivot isn t nearly as drastic ahead of the company s next flagship phone s arrival in the US now feels like a good time to examine how a once sorta plucky smartphone upstart turned into mainstream OEM Last year OnePlus co founder Pete Lau was promoted to chief product officer for both Oppo and OnePlus Carlo Allegri reutersFounded in by Carl Pei and Pete Lau OnePlus started off as a subsidiary of BBK electronics alongside other well known Chinese smartphone brands including Oppo Vivo and more recently Realme So right away there was a lot of shared DNA But critically even though OnePlus phones often had similar designs and specs compared to contemporary Oppo devices the teams behind those phones were separate The old joke for years was that the latest Vivo phone would eventually become the next OnePlus device after a few months but I digress This gave OnePlus the freedom to tweak things to suit its core audience hardcore phone nerds mostly in the US and western Europe before later expanding to India Meanwhile Oppo and Vivo focused more on the Chinese market and other regions in Asia Prior to the coronavirus pandemic when a new OnePlus phone came out it often launched first in the US OnePlus phones also had features like its Alert Slider and OxygenOS that weren t available on phones from its sister companies And as early as to percent of the company s sales came from overseas as growth in the west quickly outpaced gains in its home country More recently in OnePlus sales in the US grew by percent while practically every other phone maker saw shipments decline due to the pandemic and the silicon shortage that followed soon after In contrast to Oppo and Vivo OnePlus carved out its niche overseas and in some ways you could even think of OnePlus as a western company that just happened to be based in the east Here s a slide from OnePlus recent roundtable during MWC For a company that started out making barebones phones for enthusiasts this sort of product focus feels like it s coming from a completely different company OnePlusBut everything changed last year when OnePlus announced that it was officially merging with Oppo So now instead of being an independent company albeit with the same parent in BBK OnePlus is being positioned as a sub brand for its sister company run by Lau who will jointly oversee both companies while serving as chief product officer From a business standpoint the merger makes a lot of sense Rather than having redundant teams working on similar projects at different companies combining OnePlus and Oppo helps streamline research and development while also boosting the scale at which the company can produce and sell devices And it s a similar story for the OS powering these devices because after years of independent development OnePlus announced that OxygenOS and Oppo s ColorOS would transition to a shared codebase That means while OxygenOS will still be around it s closer to being a tweaked and stripped down skin of ColorOS designed to look OnePlus old platform But under the hood they re the same And if it wasn t for backlash from fans Oppo probably would have shelved OnePlus take on Android entirely in favor of Vivo s platform While OxygenOS and ColorOS will continue to exist OnePlus shift to a shared codebase means they are essentially the same platform with some differences and tweaks depending on your region OnePlusUnfortunately this change to the new codebase hasn t been smooth During a recent roundtable that took place during MWC late last month OnePlus head of OS product Gary Chen admitted that the latest iteration of OxygenOS version quot did not meet expectations quot On top of that when asked why the OnePlus Pro launched first in China months before becoming available in other regions Lau said the OP Pro s delayed availability wasn t caused by the ongoing global chip crunch but instead because quot software development takes longer for non China countries quot This is a very different approach to OnePlus global sales strategy compared to the past And lest we forget there still aren t even any plans to make a non pro OnePlus which just seems odd after years of new phones landing in pairs Another important factor to consider is all the former employees who have left the company recently most notably Carl Pei Not long before the OnePlus Oppo merger went down Pei left the company he helped create to launch Nothing According to Lau quot Pei s departure did not have an impact on the development of OnePlus quot And while I understand the desire for a company to put on a stoic face during a major transition allow me to reserve a bit of skepticism on that one Prior to his departure from the company last spring Pei was often the most visible OnePlus employee particularly for customers in the west Steve Jennings via Getty ImagesOver the course of multiple generations Pei was often the face of OnePlus especially for customers in the west He presented new flagship devices at launch events and regularly popped in to chat with customers or provide updates in the company s forums And after launching its first product last year the Ear earbuds Nothing is about to become one of OnePlus direct competitors now that the company is prepping to launch the Phone sometime this summer Without getting too deep into any interpersonal drama I think it s pretty clear that Pei is still very much interested in making gadgets just not at OnePlus The brain drain hasn t happened solely at the very top of the ladder either with other longtime OnePlus execs like chief marketing officer Kyle Kiang having left the company last year in April And then there are the countless numbers of OnePlus public relations communication and support staff that have departed as well Prior to I basically had the same two or three OnePlus contacts for five years running And while my more recent contacts have been nothing short of professional the amount of internal turnover I ve seen feels very much like a changing of the guard OppoAnd then there are smaller moves like pushing Warp Charging to the back burner in favor of W SuperVooc charging which is slated to arrive on an upcoming OnePlus phone sometime in Now it s hard to get too upset about getting even faster charging tech but this is yet another example of how the Oppo side of the company is seeping into OnePlus But perhaps most importantly is how OnePlus views itself After shipping more than million phones last year OnePlus set new sales records in And while the company says it will continue to support its core markets in the US India Europe and China the company also has aggressive plans to expand its markets later this year to Canada Mexico and South America a first for OnePlus And in the future OnePlus is eyeing North Africa and the Middle East as well In short while longtime enthusiasts probably won t be completely forgotten feels like a massive push from OnePlus to become a truly mainstream name OnePlus has very agressive plans for expansion as the company looks to become a truly global name in OnePlusIn some ways OnePlus has kinda become the new LG filling the void in the smartphone landscape left after Samsung s cross country rival shuttered its mobile business And while this might seem like selling out which remember is exactly what companies are made to do there are a number of positive things that have come about as part of the company s maturation We re talking about stuff like wider retail availability and improved carrier support throughout the US not to mention a growing ecosystem of gadgets that includes wireless earbuds smartwatches and more There s also the company s partnership with Hasselblad to improve its mobile photography which for OnePlus has consistently lagged behind what you get on phones from Apple Samsung and Google OnePlus has even improved the everyday durability of its handsets in recent years thanks to support for IP dust and water resistance ーeven if the company s unlocked models don t explicitly mention this in their specs And thanks to the Nord series OnePlus has a larger lineup of affordable devices than ever before OnePlusSo has OnePlus finally turned its back on its longtime customers Maybe maybe not That really depends on what you re looking for in a phone There s no question that the company s latest flagship devices are very different from what it used to make back in Heck for the first few year But at the same time people s preferences and expectations about what makes a good handset have changed a lot during the last eight years too In its quest for a worldwide presence OnePlus left a lot of its past behind And in its place we re left with a global brand that ranks as the fourth largest smartphone maker on the planet and that s not even counting Vivo that s very hungry to climb even higher So say goodbye to the old OnePlus and say hello to the rapidly expanding behemoth that s taken its place 2022-03-28 13:30:17
海外TECH CodeProject Latest Articles About trust in software systems https://www.codeproject.com/Articles/5328517/About-trust-in-software-systems system 2022-03-28 13:24:00
金融 金融庁ホームページ 「ASEAN諸国のサステナブルファイナンスに関する委託調査」報告書を公表しました。 https://www.fsa.go.jp/common/about/research/20220328/20220328.html asean 2022-03-28 14:00:00
ニュース BBC News - Home Will Smith hits Chris Rock on Oscars stage https://www.bbc.co.uk/news/entertainment-arts-60897004?at_medium=RSS&at_campaign=KARANGA actor 2022-03-28 13:25:13
ニュース BBC News - Home P&O Ferries P&O given deadline to reemploy sacked workers https://www.bbc.co.uk/news/business-60895833?at_medium=RSS&at_campaign=KARANGA previous 2022-03-28 13:33:56
北海道 北海道新聞 木下ほうかさん、ドラマ降板 週刊誌が「性加害」報道 https://www.hokkaido-np.co.jp/article/662352/ 連続ドラマ 2022-03-28 22:16:18
北海道 北海道新聞 イスラエルとアラブ・米が会合 6カ国外相、関係強化で一致 https://www.hokkaido-np.co.jp/article/662335/ 関係強化 2022-03-28 22:09:52
北海道 北海道新聞 イスラエル首相がコロナ陽性 米国務長官と会談後 https://www.hokkaido-np.co.jp/article/662357/ 国務長官 2022-03-28 22:19:00
北海道 北海道新聞 ロシア軍、戦果に焦りか 東部解放に集中 停戦交渉へ圧力 https://www.hokkaido-np.co.jp/article/662349/ 集中 2022-03-28 22:11:17
北海道 北海道新聞 国境なき医師団日本の新会長に札医大卒・中嶋医師 https://www.hokkaido-np.co.jp/article/662345/ 国境なき医師団 2022-03-28 22:09:14
北海道 北海道新聞 ソフトボール新リーグが開幕 ニトリJDリーグ https://www.hokkaido-np.co.jp/article/662351/ 開幕 2022-03-28 22:05:00
北海道 北海道新聞 NY円、123円後半 https://www.hokkaido-np.co.jp/article/662350/ 外国為替市場 2022-03-28 22:05:00
仮想通貨 BITPRESS(ビットプレス) [時事] 暗号資産の抜け道阻止 対ロシア、外為法改正で―岸田首相 https://bitpress.jp/count2/3_9_13131 阻止 2022-03-28 22:21:01
仮想通貨 BITPRESS(ビットプレス) [BUSINESS INSIDER] NFTやWeb3は非中央集権的ではない…「低賃金労働者に依存、利益を得るのは先行者だけ」と研究者が警告 https://bitpress.jp/count2/3_9_13130 businessinsidernft 2022-03-28 22:04:14
IT 週刊アスキー 最大5.5GHzのCore i9-12900KSが正式発表、4月5日発売で日本価格は10万5800円 https://weekly.ascii.jp/elem/000/004/087/4087552/ coreiks 2022-03-28 22:22:00

コメント

このブログの人気の投稿

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

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

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