投稿時間:2022-07-25 01:19:57 RSSフィード2022-07-25 01:00 分まとめ(25件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 「Apple Watch Pro」は現行デザインを進化させた新しいデザインを採用か https://taisy0.com/2022/07/25/159393.html applewatch 2022-07-24 15:53:39
python Pythonタグが付けられた新着投稿 - Qiita Pythonのパッケージマネージャなど周辺のメモ https://qiita.com/locoid-dealer/items/258d54cd2041735d3d87 周辺 2022-07-25 00:28:16
python Pythonタグが付けられた新着投稿 - Qiita 【Pytorch】2.5DのUNetを実装する https://qiita.com/gensal/items/88d61bf9738264557884 pytorch 2022-07-25 00:22:01
python Pythonタグが付けられた新着投稿 - Qiita macターミナルでの処理が完了したらLINEに通知する https://qiita.com/isshin_tech/items/8188b13dad3e8ce7d426 macターミナルでの処理が完了したらLINEに通知するmacターミナルでの処理が完了したらLINEに通知する本記事の目的そろそろ処理終わってるかなと、ターミナルを覗きに行く時間をなくすことです。 2022-07-25 00:20:05
Ruby Rubyタグが付けられた新着投稿 - Qiita html_safeの意味 https://qiita.com/kai0706/items/074b2f1a7803c4ba5f8b controllerrb 2022-07-25 00:44:26
Ruby Rubyタグが付けられた新着投稿 - Qiita Bash で alias_method_chain を実装する https://qiita.com/suzuki-kei/items/b9de9997a77567c87e1a alias 2022-07-25 00:05:57
Git Gitタグが付けられた新着投稿 - Qiita husky の pre-push が stdin is not a tty で失敗する https://qiita.com/tommy_aka_jps/items/569ca051978923577f91 gitbash 2022-07-25 00:38:42
Ruby Railsタグが付けられた新着投稿 - Qiita html_safeの意味 https://qiita.com/kai0706/items/074b2f1a7803c4ba5f8b controllerrb 2022-07-25 00:44:26
海外TECH DEV Community How To Make a Hero Image in Next.js https://dev.to/perssondennis/how-to-make-a-hero-image-in-nextjs-4lpf How To Make a Hero Image in Next jsYou may have made a hero image a few times before but have you done one in Next js If you haven t done that you may find it tricky if you would try Here I ll guide you how to do that and warn you about the gotchas In This ArticleNext js Image ComponentFailed Attempts To Create a Hero Image With Next jsHow To Create a Hero Image With Next jsSolution ExplainedSummaryBruce yourself Hulk is coming Next js Image ComponentNext js provides a really powerful Image component which you definitely should use if you don t have a reason not to It handles several things for you some which are enabled by default and some which you have to specify yourself Some examples of what the Image component can do are Automatically resize images for you No need to manually generate images of different sizes to use in a picture element with a srcset It supports several type of layouts Unfortunately it isn t very easy to understand from the documentation when to use which layout Lazy load images Images are fetched firstly when they are closed to being scrolled into view If you need to opt out of this behavior you can specify the prioritize property It lets you optimize image sizes and quality in different ways Allows you to blur images by providing a temporary blur image If you want a single colored blurred background you can generate a base encoded one here lt Image blurDataURL data image png base iVBORwKGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVRmPksopBwACGgEieImgAAAABJRUErkJggg placeholder blur s src memeUrl layout fill alt Programming meme gt Pass a base image to blurDataURL to use it as a blur placeholderTo see blurred images in action head over to the memes page at my website and scroll down Next js handles the blurring and lazy loading automatically Failed Attempts To Create a Hero Image With Next jsTrying to create a hero image with Next js can be a troublesome process As I mentioned above you should use Next js built in Image component if you don t have a reason not to In a first attempt to create a hero image you may think you can set the width of the Image component to Unfortunately that is not possible with remote images Next js don t support that You ll end up with a px wide image instead A second try could be to avoid specifying width for the Image component in hope for that it would fill the parent element Doing that will result in an Unhandled Runtime Error Error Image with src SOURCE must use width and height properties or layout fill property Next js Image component requires a width and height or a fill layoutThe error Next js outputs is quite clear You are required to set both a width and a height on the Image component unless you provide the fill value to the layout property You do exactly what Next js suggests since you are a law abiding citizen or maybe because you have no better ideas to try Using the layout property removes the error but your hero image now fills the whole viewport instead of the div that wraps it Perfect You start realizing that you will be late to grandma s dinner party tonight Being pretty great at hacking CSS you play around with the element inspector in the browser a bit You don t really get anywhere and neither Stack Overflow or Next js documentation is to any help and you don t find a tutorial for it Maybe it s best to use a native image element rather than the Image component Next js provides An apology to all vegans there will be no food for you And for the sharp joke I know it isn t bunny How To Create a Hero Image With Next jsI m happy to announce that there is an easy way to fix it The key to success is to use position relative on a parent element I would suggest to do four things Add a hero wrapper element with position relative and an appropriate width and height Add a Next js Image component with the layout property set to fill Wrap the Image component in a div with z index Add whatever hero content you want in a relative positioned div in the hero wrapper Place your hero content in that div The complete solution would look like this Header component import Image from next image import styles from header module css const heroContent heroWrapper imageWrapper styles const IMAGE URL export default gt return lt div className heroWrapper gt lt div className imageWrapper gt lt Image priority src IMAGE URL layout fill objectFit cover objectPosition center alt hero image example gt lt div gt lt div className heroContent gt lt h gt Hero Image lt h gt lt p gt Next js hero image example lt p gt lt div gt lt div gt header module css step heroWrapper position relative width vw height vh step imageWrapper z index step heroContent position relative display flex flex direction column align items center This is what it would look like using the hero image on a page Solution ExplainedSo what did we do there In step we added a relative position to the hero wrapper That s the secret to success in this case Next js will set an absolute position on its image when you set the layout property to fill in step step heroWrapper position relative width vw height vh lt div className imageWrapper gt lt image priority src IMAGE URL layout fill objectFit cover objectPosition center alt hero image example gt lt div gt In CSS absolute positioned elements are absolute relative to their closest parent that is explicitly positioned By setting the hero wrapper s position to relative the absolute positioned image within it will grow to be just as large as the hero wrapper becomes The hero wrapper will in turn be as large as the content you add to it in step Note that the hero image s width and height does not contribute to the hero wrapper s width and height since the image has an absolute position If you would remove the relative position from the hero wrapper you would see that the image instead grows to be as large as the viewport because no parent or grandparent has a position specified In step we wrapped the hero image in a div imageWrapper with z index set to and in step we added a relative positioned div heroContent as a sibling to the image wrapper That is just to ensure that other components will show on top of the hero image step imageWrapper z index step heroContent position relative display flex flex direction column align items center We do now have what we need to implement a hero image with the Next js Image component You can fill it with whatever content you want personally I prefer centered content which is most easily done with flex column and a centered align items property SummaryAlways use Next js Image component if you don t have a reason not to do it If you want to create a hero image with Next js image component wrap the hero image and its content in a relative positioned div and set the image s layout property to fill Wrap the hero image in a div with a z index of to make it show underneath the content in the hero section Create a div below the image wrapper and let it have a relative position Dennis PerssonFollow I m a former teacher writing articles about software development and everything around it My ambition is to provide people all around the world with free education and humorous reading 2022-07-24 15:54:48
Apple AppleInsider - Frontpage News Apple TV+'s 'Mythic Quest' teaser targets teamwork, the metaverse https://appleinsider.com/articles/22/07/24/apple-tvs-mythic-quest-teaser-targets-teamwork-the-metaverse?utm_medium=rss Apple TV x s x Mythic Quest x teaser targets teamwork the metaverseApple has released a first look teaser for the third season of Mythic Quest showing what to expect from the Rob McElhenney fronted Apple TV comedy for the upcoming season Published to YouTube late on Saturday the minute long teaser has a description explaining the video with the words Breakups are hard Working together is harder The description also adds the new ten episode season will air in the fall via Apple TV The teaser starts with a second season recap showing creative directors Ian and Poppy played by McElhenney and Charlotte Nicdao leaving the company to form a new venture The pair are then shown in a large white office before making a joke about the metaverse Read more 2022-07-24 15:20:54
海外TECH Engadget China launches second Tiangong space station module https://www.engadget.com/china-launches-wentian-space-module-154121941.html?src=rss China launches second Tiangong space station moduleChina has successfully launched the second of three modules that will eventually make up its Tiangong space station On Sunday at PM local time AM ET the Wentian “Quest for the Heavens module lifted off from the country s Wenchang spaceport atop a Long March B rocket Reuters reports With the launch a “complete success Wentian is expected to rendezvous with the Tiangong space station later today At that point the crew of China s Shenzhou mission will begin the work of linking Wentian with the Tianhe “Harmony of Heaves module The latter has been in space since orbital construction on Tiangong began in April Once Wentian is operational it will serve as one of two laboratories that will form Tiangong s eventual t shaped structure Once complete the station will be about a fifth of the size of the International Space Station with long term accommodation for three astronauts In addition to including space and equipment for Chinese astronauts to carry out microgravity and life sciences research Wentian features an airlock cabin that will serve as the main entry and exit point for future extravehicular activities out of Tiangong The module also has temporary living quarters that will allow China to carry out crew handover missions According to Space com the first such handover is planned for later this year China plans to launch Tiangong s final module in October The country is exploring the possibility of allowing commercial space flights to visit Tiangong It has also invited international space agencies to visit the station 2022-07-24 15:41:21
海外TECH Engadget Hitting the Books: COVID set off an exodus of urban artisans https://www.engadget.com/hitting-the-books-return-of-the-artisan-grant-mccracken-simon-and-schuster-153059931.html?src=rss Hitting the Books COVID set off an exodus of urban artisansCOVID has fundamentally changed where we live and work how we socialize and what we do to earn a living The pandemic like past microbic and economic plagues set off an exodus of well heeled professionals out of cities to the suburbs exo burbs and beyond But in an era where working from home has become easier than ever ーamong the privileged classes at least ーwill the easing of COVID restrictions see a boomerang migration back to metro centers Or like catered corporate lunches and hugging coworkers has the office as both a place of business and a social institution thankfully been made obsolete nbsp nbsp In his new book Return of the Artisan Grant McCracken explores how a post war America gradually rediscovered its home spun roots sprouting amidst the sterile futurism of the s growing through the s and s counterculture revolution and blooming with the maker movement at the start of the st century In the excerpt below McCracken discusses the accelerating effect the COVID pandemic has had on America s rejection of smart city living and embrace of a more rural artisanal lifestyle Simon amp SchusterExcerpted from Return of the Artisan Copyright Grant McCracken Reproduced by permission of Simon Element an imprint of Simon amp Schuster All rights reserved The arrival of COVID in transformed the American economy and culture in many ways It was manifestly bad for hotels airlines restaurants anyone who supplied restaurants performing arts live music gyms and country fairs It was mostly good for people who were selling online or could seize new opportunities there Etsy based artisans were quick to bring face masks to market at their height masks made up a tenth of all Etsy sales To say COVID was a mixed blessing would be an understatement But in one way COVID was unambiguously good news for the artisanal movement People began to flee the city for suburbs exurbs small towns and the countryside By some estimates three hundred thousand people left New York City heading to upstate New York and the far end of Long Island Sometimes this meant merely activating summer homes Sometimes it meant renting Sometimes it meant purchase For all it meant giving up their treasured city at least for a while Most of these people were not migrants They had no intention of staying After all a real New Yorker scorned the idea of the “bridge and tunnel world beyond the city This was the world God created for suburbanites “breeders the weak of head and heart people without real cultural currency those who choose to wallow in the wasteland of popular culture Bridge and tunnel is the world so heartlessly captured by Christopher Guest in Waiting for Guffman In this “mockumentary Guest gives us a town called Blaine Missouri a place where everyone is a clueless hick except for one man Corky St Clair Corky is in fact a total dunce Corky has failed to make it on Broadway and returned to Blaine to start again Poor Corky When he realizes that Blaine too must betray him he lashes out “And I ll tell you why I can t put up with you people because you re bastard people That s what you are You re just bastard people In a culture where expressions of outrage are crafted for us by the best writers in Hollywood “bastard people seems a little ineffectual This was Guest s point exactly In bridge and tunnel world people aren t really very good at anything They can t even manage convincing indignation The bridge and tunnel stereotype had long kept New Yorkers in place in check at home Things could get very bad in the cityーyou could lose your job You could fail to complete that novel or win that contract But until you actually left the city you were still a New Yorker an insider You were not yet Corky St Clair The artisanal movement managed to shift this stereotype It helped us see small towns and the countryside as a virtuous choice instead of a Corky scale failure With the artisanal lens in place the world outside of New York City became a more attractive place Human scale handmade historical authentic kinder gentler less competitive Quite suddenly bridges and tunnels were less a source of shame than a method of escape Some people began to hear echoes of the s and early s when the city suffered from so much unemployment and lawlessness that people began to leave taking their taxes with them and pushing the city into a downward spiral Fifty years later New York City appeared poised for yet another fall Three hundred thousand people left Fewer people threatened a small tax base fewer services and more chaos This would mean diminished police and fire support This would mean more crime and chaos This would mean more flight A self renewing cycle had been set in train New Yorkers are perpetual motion machines And now that New York City was pushing thanks to COVID and crime and places like upstate New York were pulling thanks to the artisanal revolution departure felt like a compelling option What a gift for the revolution Every small town got an infusion of people In the early part of Litchfield Connecticut got two thousand newcomers in a period that would normally bring them sixty Most came bearing the big salaries that can be made in a big city And virtually all these people had been inducted into the artisanal movement while still living in the city by the diasporic chefs doing Waters s work there They were newcomers but not entirely unwitting when it came to local culture This is what every social movement dreams of New recruits who are sophisticated and well heeled For people living in a subsistence economy barely eking out an artisanal existence this was water in the desert manna from heaven Restaurants flourished CSAs finally passed their break even point Farmer s markets filled to overflowing Life was good or at least better But of course there is always a tension The newcomers might grasp the general idea of the artisanal mission but some of the realities escaped them They could be rude and clueless In Winhall Vermont the locals were feeling a bit overwhelmed The post office ran out of available P O boxes in mid June Electricians and plumbers are booked until Christmas Complaints about bears have quadrupled And as far as the town dump is concerned as one town resident put it “the closest word I can tell you is sheer pandemonium In the worst cases the newcomers were driving real estate prices up and old timers out The irony was palpable Writing from the small town of Kingston New York Sara B Franklin warned of the “potential loss of people who ve kept our community vibrantly diverse not to mention alive and functioning Still The COVID moment brought together people with taste money and commitment with locals who had been making small towns and artisanal economies work for generations Sometimes it worked sometimes it didn t But generally speaking the artisanal movement was massively augmented The key question was whether the newcomers would stay And this depended on a series of smaller questions Would they put down roots Would they “take to life outside the big city Would their employers let them stay or would they call everyone back to headquarters the moment it was safe to do so I did a research project on American families in the COVID era Mothers were clear on whether they wanted to go back to work outside the home For most the answer was a resounding “no These women now had proof that they could work from home And now that they were working from home they looked back at the pre COVID era with a sense of puzzlement “Why was it one of them asked me “that we had to spend all that time commuting all that time on our clothing and hair all that time in the office with lots of empty engagements and pointless meetings For what In the ensuing conversation some women were prepared to entertain the suspicion that work had been a kind of “theater This had nothing to do with functionality or practicality My respondents thought something else was going on One of them said I think it must be men Women can do lots of things at the same time We can work at home We can manage a family It s men who need to have a separate time and place to work They need a box to work in It s also a question of ego Men like to see cars in the parking lots Why do women go into the office They do it to satisfy male egos in the C suite But it was not just women who took this point of view The New York Times talked to a guy who gave up his home in LA and bought a place in Vermont Apparently Jonny Hawton “finds it hard to conceive of returning to his old commuter lifestyle which allowed him only an hour a day with his year old daughter If someone told me I had to go back to do that tomorrow I don t know what I would do he said “It s almost like we were in a trance that everyone went along with I used to see Millie for an hour a day This whole crisis has kind of hit the reset button for a lot of people made them question the things they sacrificed for work These folks will want to stay outside the city and they are prepared to make extraordinary sacrifices to do so The research told me that these women had used the time saved in the COVID era to change their families to get to know their kids better to build new relationships with their daughters to restructure mealtime and to give the family new centrality At one point I thought I was looking at the possibility of the emergence of a more fully more emphatically matrifocal family 2022-07-24 15:30:59
海外科学 NYT > Science China Launches Wentian Space Station Module With Giant Rocket https://www.nytimes.com/2022/07/24/science/china-space-rocket-long-march.html booster 2022-07-24 15:46:17
金融 ◇◇ 保険デイリーニュース ◇◇(損保担当者必携!) 保険デイリーニュース(07/25) http://www.yanaharu.com/ins/?p=4977 生命保険 2022-07-24 15:27:52
ニュース BBC News - Home Tamara Ecclestone offers £6m reward for return of jewellery https://www.bbc.co.uk/news/uk-england-london-62284966?at_medium=RSS&at_campaign=KARANGA ransom 2022-07-24 15:31:42
ニュース BBC News - Home Chess robot breaks seven-year-old boy's finger during Moscow Open https://www.bbc.co.uk/news/world-europe-62286017?at_medium=RSS&at_campaign=KARANGA moscow 2022-07-24 15:21:06
ニュース BBC News - Home Surrey 'major incident' declared as grass fire ignites https://www.bbc.co.uk/news/uk-england-surrey-62283667?at_medium=RSS&at_campaign=KARANGA chertsey 2022-07-24 15:18:15
ニュース BBC News - Home Ballymena: Wrightbus founder Sir William Wright dies https://www.bbc.co.uk/news/uk-northern-ireland-62284408?at_medium=RSS&at_campaign=KARANGA ballymena 2022-07-24 15:15:30
ニュース BBC News - Home French Grand Prix: Max Verstappen wins from Lewis Hamilton after Charles Leclerc crashes out https://www.bbc.co.uk/sport/formula1/62284619?at_medium=RSS&at_campaign=KARANGA French Grand Prix Max Verstappen wins from Lewis Hamilton after Charles Leclerc crashes outCharles Leclerc gifts Max Verstappen victory and a huge advantage in the World Championship by crashing out of the lead of the French Grand Prix 2022-07-24 15:40:35
ニュース BBC News - Home England v South Africa: ODI series finishes 1-1 after Headingley washout https://www.bbc.co.uk/sport/cricket/62284202?at_medium=RSS&at_campaign=KARANGA headingley 2022-07-24 15:14:19
ニュース BBC News - Home Evian Championship: Canadian Brooke Henderson wins second major title https://www.bbc.co.uk/sport/golf/62283232?at_medium=RSS&at_campaign=KARANGA final 2022-07-24 15:45:32
北海道 北海道新聞 USJで「呪術廻戦」劇場ショー 9月から来年7月まで https://www.hokkaido-np.co.jp/article/709646/ 呪術廻戦 2022-07-25 00:23:00
北海道 北海道新聞 F1、角田はリタイア フランスGP決勝 https://www.hokkaido-np.co.jp/article/709645/ 角田 2022-07-25 00:23:00
北海道 北海道新聞 林外相、ロシアの攻撃非難 輸出再開合意の履行要求 https://www.hokkaido-np.co.jp/article/709644/ 非難 2022-07-25 00:13:00
北海道 北海道新聞 東京・あきる野市長、失職公算大 不信任派議員が過半数当選 https://www.hokkaido-np.co.jp/article/709643/ 不信任決議 2022-07-25 00:02: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件)