投稿時間:2021-05-28 04:17:55 RSSフィード2021-05-28 04:00 分まとめ(19件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Machine Learning Blog Fine-tune and deploy the ProtBERT model for protein classification using Amazon SageMaker https://aws.amazon.com/blogs/machine-learning/fine-tune-and-deploy-the-protbert-model-for-protein-classification-using-amazon-sagemaker/ Fine tune and deploy the ProtBERT model for protein classification using Amazon SageMakerProteins the key fundamental macromolecules governing in biological bodies are composed of amino acids These essential amino acids each represented by a capital letter combine to form a protein sequence which can be used to predict the subcellular localization the location of protein in a cell and structure of proteins Figure Protein Sequence … 2021-05-27 18:25:12
AWS AWS - Webinar Channel Quickly Enable Predictive Maintenance Using Amazon Monitron, an End-to-End System https://www.youtube.com/watch?v=2O-UvaVKVlQ Quickly Enable Predictive Maintenance Using Amazon Monitron an End to End SystemSuccessfully implementing predictive maintenance requires installing sensors and gateways in order to collect data from your industrial equipment and building a machine learning ML model that analyzes your sensor data to give you valuable insights However companies have historically needed skilled technicians and data scientists to piece together these complex solutions from scratch In this Tech Talk we will introduce you to Amazon Monitron an end to end system that uses machine learning ML to monitor the condition of your equipment and detect abnormal behavior enabling you to implement predictive maintenance and reduce unplanned downtime Amazon Monitron includes wireless sensors to capture vibration and temperature data from equipment a gateway device to securely transfer data to AWS the Amazon Monitron service that analyzes the data for abnormal equipment conditions using machine learning and a companion mobile app to set up the devices and receive reports on operating behavior and alerts to potential failures in your machinery You can start monitoring equipment condition in minutes without any development work or ML experience required Learning Objectives Learn how you can install wireless Amazon Monitron Sensors and Gateways using the Amazon Monitron app and start monitoring your equipment in minutes Learn how Amazon Monitron secures the sensors gateways and the communication between them and the Amazon Monitron service and encrypts your data at rest and in transit Learn how Amazon Monitron continually improves over time by allowing your technicians to easily enter feedback on the alerts in the mobile app To learn more about the services featured in this talk please visit 2021-05-27 18:39:35
海外TECH DEV Community Laravel Has Many Through Relationship Explained with Example https://dev.to/mahmudulhsn/laravel-has-many-through-relationship-explained-with-example-22p4 Laravel Has Many Through Relationship Explained with ExampleEloquent Relationships is one of the most useful and powerful features of the Laravel Framework It is one of the reasons why I like Laravel most Mainly it helps us to fetch or insert data in a very easy and efficient way As we know there are several types of relationships in Laravel We developers use the first four of the most These are One To One One To Many One To Many Inverse Belongs To Many To Many I like Many To Many and Has Many Through most Honestly speaking I enjoy these two relations most Today I will explain Has Many Through with an easy example I hope you ll be very clear after finishing this article So let s jump to our main section Let us have a scenario where we are creating a restaurant s items menu and Items belongs to the Type and Types belongs to Category In simple words Category has many Types and Type has many Items Now if we want all the Items which belongs to the Category we need to keep the category id in items table But out items mainly belongs to Type Basically Items are directly connected to Types So it s the case where we should use Has Many Through By this kind of relation we can fetch the data via another model Like our scenario we can directly fetch Items from Category via Types For your better understand I have created a GitHub Repository You can visit this repository if you want There I gave two types of examples for Has Many Through I try to give a very simple example so that I can make you understand easily So Let s start As I mentioned earlier that we are work with Category Type and Item So I make my migration very simple Here is my migration for Category Let s have a look at this lt phpuse Illuminate Database Migrations Migration use Illuminate Database Schema Blueprint use Illuminate Support Facades Schema class CreateCategoriesTable extends Migration Run the migrations return void public function up Schema create categories function Blueprint table table gt id table gt string name table gt timestamps Reverse the migrations return void public function down Schema dropIfExists categories You can see I kept only category name here Let s have look at my Category Model lt phpnamespace App Models use Illuminate Database Eloquent Factories HasFactory use Illuminate Database Eloquent Model class Category extends Model use HasFactory The attributes that are mass assignable var array protected fillable name Here is my types migration Let s have a look lt phpuse Illuminate Database Migrations Migration use Illuminate Database Schema Blueprint use Illuminate Support Facades Schema class CreateTypesTable extends Migration Run the migrations return void public function up Schema create types function Blueprint table table gt id table gt string name table gt unsignedInteger category id table gt timestamps Reverse the migrations return void public function down Schema dropIfExists types I just kept category id as foreign key So Category is connected with Type Here is the Type model lt phpnamespace App Models use Illuminate Database Eloquent Factories HasFactory use Illuminate Database Eloquent Model class Type extends Model use HasFactory The attributes that are mass assignable var array protected fillable name category id You might find it very simple Let s jump to my Items Migration lt phpuse Illuminate Database Migrations Migration use Illuminate Database Schema Blueprint use Illuminate Support Facades Schema class CreateItemsTable extends Migration Run the migrations return void public function up Schema create items function Blueprint table table gt id table gt string name table gt longText description table gt unsignedInteger type id table gt timestamps Reverse the migrations return void public function down Schema dropIfExists items So here you can see that I just kept type id as a foreign key So Type is connected with Item I didn t keep any category id in Items Migration Here is the main fact you need to understand that Item is not directly connected with Category Item is connected with Category via Type So that s why it s called Has Many Through relationship Now here is the model for Item lt phpnamespace App Models use Illuminate Database Eloquent Factories HasFactory use Illuminate Database Eloquent Model class Item extends Model use HasFactory The attributes that are mass assignable var array protected fillable name description type id Now we will build a Has Many Through Relationship from Category to Item Let s create this relation to Category model lt phpnamespace App Models use Illuminate Database Eloquent Factories HasFactory use Illuminate Database Eloquent Model class Category extends Model use HasFactory The attributes that are mass assignable var array protected fillable name Get all of the items for the user public function items return this gt hasManyThrough Item class Type class Here items is the relation that will fetch all the items that belongs to the category via type You can also use relation like this return this gt hasManyThrough Item class Type class category id Foreign key on the types table type id Foreign key on the items table id Local key on the users table id Local key on the categories table There it goes Our Has Many Through relationship has been build up successfully I want to give you another scenario where you can use this relationship for your better understand ScenarioSuppose we have three models Team id user id name User id name Goal id user id no of goals So the relationship is like this Team hasMany User team id inside User model User hasMany Goal user id inside Goal model See from the relationship we can see that here the User model is an intermediary model We can not store the goal id directly to the Team table because we already store the goal id in the User table So now the User model is in a relationship with the Team model So inside the User model there is team id Finally if we need to access how many goals the Team has created then we can go through User model If that type of scenario is generated for your use case then and then you need to define Has Many Through relationship I hope it is clear now Suggested ReadsLaravel Documentaiton 2021-05-27 18:11:05
海外TECH DEV Community Revealing Multiple Content on Scroll Using JavaScript's Intersection Observer https://dev.to/daveyhert/revealing-multiple-content-on-scroll-using-javascript-s-intersection-observer-1o7f Revealing Multiple Content on Scroll Using JavaScript x s Intersection ObserverIn this article we would continue our discussion on JavaScript s Intersection Observer API and how we could easily use it to observe multiple elements in the DOM revealing each as they come into view As this is the second part of a two series article it is mandatory that you ve read the first part of the Intersection Observer series titled Revealing Contents on Scroll Using JavaScript s Intersection Observer API It is the foundation from which this article is built on and the core essential basics of the Intersection Observer has been thoroughly covered in that article PrerequisitesBasic knowledge of JavaScript beginner level is perfectly fine as I d explain everything in great details like I was explaining to a year old Basic knowledge of HTML and CSS you ve built at least one basic webpage with them A code editor VS Code recommended A browser of course Chrome or Firefox recommended You ve read the first article of the series or at least have a basic understanding of the Intersection Observer Revealing Contents on Scroll Using JavaScript s Intersection Observer API David Herbert・May ・ min read javascript css html webdev Creating a Basic HTML CSS PageAs with the previous article we ll start by creating a simple HTML page with a hero header section and a title inside of it Then below the header we ll create sections and for each section we will create a title and a content box with two columns inside it Each column would have an image inside one in the left column and the other in the right column The idea is as we approach each section the columns would slide in with the image in them from their respective sides i e the one on the left would come in from the left side of the viewport while the one on the right would come in from the right So let s dive into the HTML lt body gt lt Header gt lt header gt lt h gt Just a Header lt h gt lt h gt Scroll to Reveal Content lt h gt lt header gt lt Section gt lt section class section gt lt h gt Section lt h gt lt div class content gt lt div class left column gt lt img class img src img image jpg gt lt div gt lt div class right column gt lt img class img src img image jpg gt lt div gt lt div gt lt section gt lt Section gt lt section class section gt lt h gt Section lt h gt lt div class content gt lt div class left column gt lt img class img src img image jpg gt lt div gt lt div class right column gt lt img class img src img image jpg gt lt div gt lt div gt lt section gt lt Section gt lt section class section gt lt h gt Section lt h gt lt div class content gt lt div class left column gt lt img class img src img image jpg gt lt div gt lt div class right column gt lt img class img src img image jpg gt lt div gt lt div gt lt section gt lt body gt Now for the CSS we ll give the header and each section a height of vh align the title text to the center then set the content box to a column view each column taking of the viewport s width and vertically centring everything using flexbox We ll then set each image to a block element give the images a fixed responsive width and then using margin auto to horizontally centre each in their respective column Now to add a bit of aesthetics to our design we ll apply a gradient background colour to each section to separate them import a decent font from Google font and then add a bit of polaroid depth to the images using box shadow Lastly we will create two hidden classes hidden left and hidden right that would be responsible for hiding and revealing each content s column later on using JavaScript and apply a transition effect on each column import url wght amp display swap margin padding box sizing border box h h h text align center margin bottom rem color text align center font family Nunito sans serif h font size rem font weight h margin bottom rem font size rem h font size rem img width max width px display block margin auto border radius px box shadow px px px rgba section header height vh display flex flex direction column justify content center background fdfbfb background image linear gradient deg fdfbfb ebedee overflow hidden section header background ebedee background image linear gradient deg fffa cfddd content display flex content gt div width hidden left opacity transform translateX hidden right opacity transform translateX left column transition all s ease in out right column transition all s ease in out The resulting layoutGreat we have our basic webpage set up now let s dive into JavaScript and talk about how we can observe each section using the Intersection Observer Implementing the Intersection Observer API on Multiple ElementsRecall from the previous article that the steps for observing an element are as follows Select the target element you wish to observe section Define an options object with your customisation options for the Intersection Create the actual Observer using its object constructor function and pass it a callback function and the options object new IntersectionObserver callback options Pass the target element to be observed to the Observer using the observe method Observer observe section Finally define the callback function with the desired Intersection behaviour That s it If you can vividly remember these steps above then we can begin our implementation of the observer on multiple sections but if you can t recall exactly what we did previously you re advised to quickly go read up the part one before continuing past here Note The Intersection Observer can accept only one element for observation at a time This means if you need to observe multiple elements you d have to iterate loop over all of them and observe each of them separately Now let s begin we ll start by selecting all sections that we wish to observe const allSections document querySelectorAll section This selector returns a Nodelist containing all sections in our webpageNote A NodeList is simply a collection of elements in the DOM that is stored in what looks like an array and although it isn t an array we can loop through a NodeList like actual arrays Next we will define the options object needed to customize the Intersection We will set the root element as the browser null then set the threshold to i e the callback should be fired when of the target section comes into view We won t specify any rootMargin as we have no need for it we only used it previously to discuss its use case const options root null threshold With that out of the way we can finally create an observer using its default constructor function and then pass it a callback function and the options object const sectionObserver new IntersectionObserver callback options Finally we have to tell the sectionObserver what it should observe in the DOM by passing the element to the observer But since we are interested in multiple elements that we previously stored in a NodeList we simply have to loop through this NodeList and for each iteration loop we pass each section element to the observer By the end of the loop all sections would be under observation allSections forEach section gt sectionObserver observe section Let s go through what we just did We first selected the target sections to be observed and stored them in a NodeList allSection then we created an actual observer sectionObserver and finally we told the observer what to observe by looping through the allSection NodeList using a forEach method and then we passed each target section to be observed into the observer using the observe method That s it we have everything set up the only thing left now is defining our callback function to be executed Important DetailRecall from the previous article that the observer always fires the callback function once when our webpage loads for the first time Well that once only applies to when you are observing a single element but when you re observing multiple elements the callback gets fired once for each element under observation This does not mean there is an actual Intersection but the elements are simply getting registered by the observer If we consoled log the entries in our callback we d get the array of each element s entry that was fired This can be very confusing for most beginners and trigger the wrong behaviour in their code if not properly guarded or written Now that we have the observer set up let s hide all the content columns that we wish to reveal on Intersection by adding the hidden classes to them and then writing a callback function that removes these hidden classes on Intersection We could have simply added the classes manually in our HTML but that s bad practice as a user s browser might have JavaScript turned off which would result in our webpage not displaying any content as JavaScript wouldn t be able to remove the hidden classes document querySelectorAll left column forEach column gt column classList add hidden left document querySelectorAll right column forEach column gt column classList add hidden right What did we just do We simply selected all the columns on the left and then looped through them using forEach and then added the hidden left class to each column Then we did the same exact thing for the right columns using the hidden right class The Callback FunctionWe can now define the callback function but before getting into that I d like to talk about something I did not get to cover in the previous article and that s how to un observe stop observing a target element after its Intersection Now you might be wondering why you d want to stop observing a target element after an Intersection Well let s take a cursory look at the behaviour of the webpage from the previous article Notice that the image content keeps sliding in as it comes into view and then sliding back out as we scroll out of view which means the callback function keeps firing over and over again for as long as the user keeps scrolling on the webpage We might not always want this behaviour as we might simply want the content to reveal itself once it comes into view and nothing more it should remain visible even if we scroll out of view For this the observer has an unobserve method that can be used to un observe a target element but to be able to use this method we d have to pass the actual observer that is firing the callback function to this same callback function as a second argument Recall that the callback function by default receives an entries array when the callback function is fired by the Observer Well that s not the only thing that the callback function can receive the observer itself can be passed to it as a second argument so we can un observe an element with it With that in mind let s create our callback function before going over it line by line function callback entries observer const entry entries if entry isIntersecting return get the class name of the target section that came into view const curSectionsName entry target getAttribute class now target that specific section const curSection document querySelector curSectionsName remove the hidden classes DOM traversing curSection lastElementChild firstElementChild classList remove hidden left curSection lastElementChild lastElementChild classList remove hidden right observer unobserve entry target Now let s dissect the callback function line by line const entry entries Again recall that the Observer passes an entries array to the callback containing an IntersectionObserverEntry object We simply deconstructed extracted the object in the array and stored it in anentryvariable to make it easier to directly access the properties stored in that object if entry isIntersecting return This line of code is considered a guard Because the callback is fired for each observed section by default we only want to do something run the code below this line when there is an actual intersection i e when isIntersecting is true we are currently checking to see if there is a false Intersection and if that is the case we want the function to terminate itself to simply return without running any of the code below this line of code Consider it a body guard if you would const curSectionsName entry target getAttribute class We simply check the target property in the entry object for the exact section that came into view that has intersected with the viewport then we take its class name and store it in a variable curSectionsName const curSection document querySelector curSectionsName Because we previously only fetched the class name of the section that came into view this line simply targets that exact section in the DOM using the query selector and then we passed the current sections class name stored in curSectionsName to the selector we used template strings to pass that variable into our selector Then we stored the current section in curSection curSection lastElementChild firstElementChild classList remove hidden left Now that we have the section in view we do not want to do anything with the section itself but the two columns inside it But do you recall from our HTML that we put both columns in a content container So we have to traverse the DOM move around in the DOM to grab them Let s take a quick look at the logic for beginners curSection Recall that this is the current section in the viewport lastElementChild Because each section has a h text and a content container as children we simply target the last child i e the content element firstElementChild Now that we have access to the content container holding both columns we use this line selector to targets the first column left column in the content element as it is the first element in the container classList remove hidden left Then we simply check the classList of this column and remove the hidden class we previously added to it That s it we simply repeat the exact same thing for the right column in the next line of code observer unobserve entry target Recall that while defining the callback function we passed the observer firing this same function as a second argument to the function itself As a result our callback now has access to the Observer firing it We simply tell the observer to stop observing the target section that came into view after its content has been revealed That s all our webpage should now behave as expected As you can see once we scroll towards each observed section once of the section comes into view in our viewport an Intersection is triggered and the callback is fired The hidden classes get removed and the columns are revealed as they slide back into their original position Then the Observer stops observing that section Demo Source Code ConclusionCongrats You have successfully learnt how to observe multiple elements in the DOM using the Intersection Observer how to reveal multiple contents while scrolling the webpage and how to un observe an element after an Intersection If you found this article helpful in any way do well to leave a reaction and follow me for more awesome contents And if you ve got any questions or spotted any errors please do well to leave some feedback Thank you for reading References MDN Web Docs W Org 2021-05-27 18:01:05
Cisco Cisco Blog Helping Partners Through Magnified IT Market Change https://blogs.cisco.com/partner/helping-partners-through-magnified-it-market-change Helping Partners Through Magnified IT Market ChangeAs companies seek guidance and help to navigate their IT journey post COVID the role of partners has become more vital  Guest blogger Steve White Program Vice President at IDC discusses how the Cisco Partner Program can help companies adapt and evolve by using iDC s five stage model for enterprise recovery 2021-05-27 18:00:40
海外科学 NYT > Science What to Name a Bunch of Black Holes? You Had Some Ideas. https://www.nytimes.com/2021/05/27/science/black-hole-names-holley-bockelmann.html enigmatic 2021-05-27 18:53:33
ニュース BBC News - Home Covid-19: Up to 75% of new UK cases could be Indian variant - Matt Hancock https://www.bbc.co.uk/news/uk-57275276 hancock 2021-05-27 18:09:12
ニュース BBC News - Home Covid: Live music events to return in Wales https://www.bbc.co.uk/news/uk-wales-57274118 groups 2021-05-27 18:43:37
ビジネス ダイヤモンド・オンライン - 新着記事 五輪開催に突き進む菅政権に朝日新聞が大手紙初の中止提言 - 永田町ライヴ! https://diamond.jp/articles/-/272325 二階俊博 2021-05-28 03:50:00
ビジネス ダイヤモンド・オンライン - 新着記事 武漢のウイルス流出疑惑、焦点は廃銅山(後編) - WSJ PickUp https://diamond.jp/articles/-/272214 wsjpickup 2021-05-28 03:45:00
ビジネス ダイヤモンド・オンライン - 新着記事 米中の新たな競争分野、5Gの車両通信 - WSJ PickUp https://diamond.jp/articles/-/272339 wsjpickup 2021-05-28 03:40:00
ビジネス ダイヤモンド・オンライン - 新着記事 「生活保護」の利用も不可…難民認定を待つ外国人たちの人知れぬ苦悩 - 生活保護のリアル~私たちの明日は? みわよしこ https://diamond.jp/articles/-/272198 2021-05-28 03:35:00
ビジネス ダイヤモンド・オンライン - 新着記事 相手にちゃんと伝えるための話し方、4つのコツ - 一瞬で大切なことを伝える技術 https://diamond.jp/articles/-/271957 三谷宏治 2021-05-28 03:30:00
ビジネス ダイヤモンド・オンライン - 新着記事 就活生が陥る「内定」の落とし穴、知ると差がつくコロナ2年目の採用裏事情 - 採用のプロが明かす最新就活事情 https://diamond.jp/articles/-/271877 就職活動 2021-05-28 03:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 【時代の論客】ひろゆきが「一生懸命働かないために守っている習慣」 - 1%の努力 https://diamond.jp/articles/-/272196 youtube 2021-05-28 03:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 動物にもコロナワクチン、ロシアでペットなどに接種開始 - WSJ発 https://diamond.jp/articles/-/272576 開始 2021-05-28 03:18:00
ビジネス ダイヤモンド・オンライン - 新着記事 会社を辞めるか辞めないか迷っているときに読みたい、200万いいね! を集めたシンプルな言葉 - もっと人生は楽しくなる https://diamond.jp/articles/-/268213 会社を辞めるか辞めないか迷っているときに読みたい、万いいねを集めたシンプルな言葉もっと人生は楽しくなる「人とうまく距離がとれない……」「気づかいしすぎて疲れてしまう……」「言いたいことがうまく言えない……」そんな人間関係の悩みを抱える人々たちに向けて、シンプルながらも心に深く突き刺さる言葉を日々発信し、万人以上のInstagramフォロワーから支持されているたぐちひさとさんをご存じでしょうか。 2021-05-28 03:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 このワンパターンでOK!「シートごとコピー」するExcelマクロをマスター - 4時間のエクセル仕事は20秒で終わる https://diamond.jp/articles/-/272493 excel 2021-05-28 03:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 新任リーダーが必ずぶつかる 「前任者の壁」の乗り越え方 - 「よそ者リーダー」の教科書 https://diamond.jp/articles/-/271893 著者 2021-05-28 03:05: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件)