投稿時間:2022-06-08 19:30:25 RSSフィード2022-06-08 19:00 分まとめ(35件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… OCN モバイル ONEが6月10日に何らかの新発表を行う模様 − MNPユーザー向けの新施策か https://taisy0.com/2022/06/08/157935.html twitter 2022-06-08 09:43:37
IT 気になる、記になる… ソニー、ワイヤレスイヤホン「LinkBuds S」向けにアップデートを配信開始 − Spotifyの再生問題を修正 https://taisy0.com/2022/06/08/157933.html linkbudss 2022-06-08 09:37:14
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 還暦を迎える人の貯蓄額、約4割が「500万円未満」 平均は? https://www.itmedia.co.jp/business/articles/2206/08/news184.html itmedia 2022-06-08 18:20:00
IT ITmedia 総合記事一覧 [ITmedia News] 日清紡Gでもセキュリティコードなどクレカ情報1000件漏えいか ECサイト改ざんで https://www.itmedia.co.jp/news/articles/2206/08/news198.html itmedia 2022-06-08 18:16:00
IT ITmedia 総合記事一覧 [ITmedia News] iPhoneがMacのWebカメラ/天釣りカメラになる「連携カメラ」「デスクビュー」の仕組みが分かった https://www.itmedia.co.jp/news/articles/2206/08/news194.html apple 2022-06-08 18:02:00
AWS AWS - Japan Amazon FSx for Windows File Server: 2022 ver 【AWS Black Belt】 https://www.youtube.com/watch?v=_86Iych7GwU amazon 2022-06-08 09:03:22
python Pythonタグが付けられた新着投稿 - Qiita 競馬予想アプリ https://qiita.com/miyuu1234/items/5be0367c524e724bd3c9 sstimportpandasaspdimport 2022-06-08 18:40:43
js JavaScriptタグが付けられた新着投稿 - Qiita TypeScriptのオブジェクトリテラルとオブジェクト型を理解したい https://qiita.com/shimajiri/items/77407b7db6c17218f3c1 newobject 2022-06-08 18:57:42
Ruby Rubyタグが付けられた新着投稿 - Qiita Rubyバージョンが切り替わらない? rbenvがバージョンを決める順番について https://qiita.com/lei90/items/3465b177632416cca1fe global 2022-06-08 18:35:26
AWS AWSタグが付けられた新着投稿 - Qiita AWS DynamoDB CLI基礎操作:データ更新(update-expression) https://qiita.com/sundwn2/items/5edd6520fa11facf7ded oexporttable 2022-06-08 18:35:58
Azure Azureタグが付けられた新着投稿 - Qiita 秘密鍵と証明書から秘密キー証明書pfxファイルの生成する方法 https://qiita.com/yymo10/items/225852e6922932f2e998 auzre 2022-06-08 18:27:34
Git Gitタグが付けられた新着投稿 - Qiita git: 結果にコミットする https://qiita.com/kyamad/items/d9f233966a8eb38aeb62 github 2022-06-08 18:23:23
Ruby Railsタグが付けられた新着投稿 - Qiita Rubyバージョンが切り替わらない? rbenvがバージョンを決める順番について https://qiita.com/lei90/items/3465b177632416cca1fe global 2022-06-08 18:35:26
Ruby Railsタグが付けられた新着投稿 - Qiita Railsでエンドポイントを立てるときに沼った話 https://qiita.com/mejiro03/items/66e884641f40abcaf44b rails 2022-06-08 18:29:34
技術ブログ Developers.IO WASM実行基盤、wasmCloudを試してみる https://dev.classmethod.jp/articles/wasm-wasmcloud/ ductionwebassemblywasm 2022-06-08 09:08:15
海外TECH MakeUseOf M2 MacBook Air vs. M1 MacBook Air: Is It Worth the Upgrade? https://www.makeuseof.com/m2-macbook-air-vs-m1-macbook-air/ macbook 2022-06-08 09:08:43
海外TECH DEV Community Enabling Preview mode in your Next.js application https://dev.to/kaspera/enabling-preview-mode-in-your-nextjs-application-30do Enabling Preview mode in your Next js applicationThere s no doubt about it Jamstack is here to stay Since Matt Biilmann took the concept mainstream back in a whole ecosystem based upon this architecture has sprung up including our very own Speed layer Enterspeed but more on that later Developers love the benefits a Jamstack architecture can bring to both the site itself and the workflow of the project We won t dive into the many benefits in this article since books could be and have been written about this subject However a site is rarely run by developers alone but by a wide range of people e g content creators like copywriters marketers supporters etc All of these people have to be taken into account when developing a new site Most content creators have worked with some sort of CMS in the past for instance WordPress and have gotten accustomed to the editor experience One of the key functionalities that content creators often use is the option to preview their content before publishing This can be kind of tricky when using SSG Static Site Generation since we want to render these pages at request time instead of build time And even though we developers consider our IDE our second home most content creators aren t that keen on booting up a local instance of the project in order to preview their content I know right Luckily the awesome team behind Next js came up with a brilliant solution to this problem Preview mode Setting up Preview mode enables you to bypass SSG and render the page at request time So how does it work and how do we enable it Let s look into it Setting up Preview mode in Next jsNote This article is based on the Next js fantastic documentation therefor similar phrasing and code examples will occur In the Next js repo you ll find plenty of examples of how to set up your headless CMS with Next js Preview mode In this tutorial we will base the examples on our own solution Enterspeed What is Enterspeed Enterspeed is a Speed layer that lets you connect and combine all your services into a single API endpoint Our low editor makes it easy to transform your data to get exactly what you need all stored in our blazing fast edge network This makes it ideal for speeding up legacy systems e g Umbraco solutions Well enough self promotion this was simply to give you some context for the examples below Creating a Preview API routeNext js provides a solution to build your API This is done by creating a folder called api inside the pages folder pages api Any file inside this folder will be treated as an API endpoint instead of a page Create a file called preview js or ts if you re using TypeScript inside the pages api folder On the response object res we will call setPreviewData which will turn on preview mode by setting some cookies Once you ve accessed the API route you can open your browser s developer tools to see that the prerender bypass and next preview data cookie have been set Tip You can specify the preview mode duration setPreviewData takes an optional second parameter the options object Inside the object set the key to maxAge and the value for how long the preview session should last in seconds All requests to Next js which have these cookies will now be seen as preview mode which will modify how statically generated pages behave Since you don t want anybody accessing your preview content a good idea is to create a secret token string for your preview URL You can use one of the many token generators out there for instance RandomKeygen com to generate your secret token Tip Store your secret in an environment variable and have your team save the preview URL including the secret token in a password manager like Password Note If your headless CMS supports setting custom preview URLs you can implement a fetching logic that redirects to the fetched post In this example we simply redirect to root Next let s implement a way to disable preview mode again by clearing the Preview mode cookies Create a new file in the api folder pages api called clear preview js Here you need to call clearPreviewData on the response object Once you ve accessed this API route you can open your browser s developer tools to see that the prerender bypass and next preview data cookie have been removed Tip For a cleaner URL structure you can create a folder inside the api folder called preview and rename preview js to index js Then you can simply name clear preview js to clear js which will be available via api preview clear Updating getStaticPropsThe getStaticProps function is used in SSG to pre render a page at build time using the props returned by getStaticProps However when Preview mode is enabled getStaticProps will be called at request time instead of at build time It will also have a context object where context preview will be true which is the one we will use To make the code easier to read we can destruct the context object like this Next we will fetch different data based on whether preview is true or not How this is done can vary based on your CMS In our case using Enterspeed we have an API call function that takes the preview context as a parameter Based on its value true false it will either fetch content from our preview data source or production data source Note Enterspeed stores preview data in a separate data source this may not be the case for your solution Inside our getStaticProps function we pass the Preview context to our getByUrl function which passes it to our API call function Bonus tip Implement a preview barTo help our content creators know if preview mode is enabled or not we have implemented a preview bar in our project There are multiple ways of doing this each with its own drawbacks Since we wanted the preview bar to be visible across our entire site to make sure the content creator knew they had preview mode enabled we decided to set a session cookie once Preview mode had been enabled We could have used getInitialProps to check for the Preview context in our app js unfortunately this disables Automatic Static Optimization which we are not interested in Since we can t set a session cookie via our API route we passed the query preview true amp secret process env ENTERSPEED PREVIEW SECRET on our res redirect in api preview js The secret isn t strictly necessary but simply to help ensure that the preview parameter is set via the API route Next we created two helper functions one of which checks to see if the previewMode session cookie is set to enabled and one which manages the previewMode session cookie It checks to see if the preview parameter is true and if the secret parameter matches our secret by using the next router If so we set the session cookie previewMode to enabled If the preview parameter is equal to clear we then remove the cookie again In both functions we also check to see if we have access to the window object so we can set the cookie Inside our app js we then call our managePreviewSessionStorage function We also check to see if checkPreviewSessionStorage returns true if so we render our PreviewBar component And that s it Now both developers and content creators can be happy I hope you enjoyed the article if you are interested in knowing more about Enterspeed you can check us out at enterspeed com 2022-06-08 09:41:12
海外TECH DEV Community Smart pointers and their deleters https://dev.to/sandordargo/smart-pointers-and-their-deleters-32mn Smart pointers and their deletersBjarne Stroustrup the father of C once said that C makes it easy to shoot yourself in the foot C makes it harder but when you do it blows your whole leg off Why did he say so What makes C so dangerous In fact it s probably better to ask what made C so dangerous The answer to that question is arguably memory management Allocating memory on the heap with the new keyword and making sure that the memory always gets deallocated with delete and exactly once used to be a difficult task And whenever you failed you were punished hard at unexpected times And we haven t even mentioned malloc and free With C we received smart pointers so that it s not an issue anymore Smart pointers are considered smart because they track their own lifetime and take care of deallocating the memory No manual actions required C did not introduce only one smart pointer but of them right away As well informed C developers we d better understand which one to choose and why Let s dig into the why in this article What kind of smart pointer should you choose Let s not waste too much time on std weak ptr They have a specific usecase and we barely need them but when we do we don t much choice Let s just say that we use should use them to break the cycle in the case of cyclic ownership Let s say that you have an instance of a Keyboard a Logger and a Screen object Both the Screen and the Keyboard has a shared pointer of the Logger and the Logger should have a pointer to the Screen Keyboard gt Logger lt gt ScreenWhat pointer can it use If we use a raw pointer when the Screen gets destroyed the Logger will be still alive and the Keyboard still has shared ownership on it The Logger has a dangling pointer to the Screen If it s a shared pointer there is a cyclic dependency between them they cannot be destroyed there is a resource leak Here comes the std weak ptr to the rescue There is still a dangling pointer from Logger to the Screen when the Screen gets destroyed but it can be easily detected with a weak pointer That leaves us with the choice of either a shared or a unique pointer My experience in big corporate codebases show that people by default choose the std shared ptr whereas they should do exactly the opposite But why do they choose a shared pointer over a unique one I think simply because it s easier to use A unique ptr is not copy able thus if you have to pass around you either have to dereference it and pass around the raw pointer or you have to use std move With shared pointers you don t put yourself up to this hassle The key for making the right choice is education Let s consider two things Types communicate meaning through their names Is the ownership really shared between different owners or is there only one entity that can own a resource Usually it s the latter case and it s a good enough reason to use the unique ptr Not to mention that once you re sure that a pointer must be valid you can simply pass around a reference Another thing to take into consideration is performance benefits Shared pointers are more expensive than unique pointers that essentially do not bring any overhead compared to raw pointers Why are unique pointers cheaper It s way better when we don t only know some facts and take them granted but when we actually understand the reasons behind Let s dig into why shared pointers are more expensive than unique pointers Let s start with the answer you probably already heard about before we delve into the more surprising Reference countingA unique pointer holds a pointer that is referred to by only entity the owner Hence it s unique Once it goes out of scope the pointer is deleted But the resource held by the shared pointer can be referred to by other shared pointers and it has to know when to destroy the resource For that it counts how many others refer to the resource In fact it has counters counting the number of shared and weak pointers The counters take up some space and maintaining the counters needs some instructions it needs some time It has its consequences in terms of performance But is that the main and only reason behind why shared pointers are slower than smart ones It s definitely not the only reason and often not even the main one Type erasure deletersBoth unique and shared pointers can take custom deleters They can be useful if you want do something non conventional while deleting the resource Like not deleting it or maybe logging Here is how to use it include lt iostream gt include lt memory gt template lt typename T gt struct FakeDeleter void operator T ptr std cout lt lt FakeDeleter doesn t delete n template lt typename T gt struct LoggingDeleter void operator T ptr std cout lt lt LoggingDeleter is at work n delete ptr int main std unique ptr lt int FakeDeleter lt int gt gt up new int FakeDeleter lt int gt std shared ptr lt int gt sp new int FakeDeleter lt int gt Notice how the creation of the pointers differ We pass in both cases the deleter as arguments to the constructor but it only appears only for the unique ptr as a template argument What does this mean for us The deleter is part of the type of the unique pointer for example this expression would not compile as a move assignment between different types without available implicit conversion is not permitted std unique ptr lt int FakeDeleter lt int gt gt upFD new int FakeDeleter lt int gt std unique ptr lt int FakeDeleter lt int gt gt upFD new int FakeDeleter lt int gt std unique ptr lt int LoggingDeleter lt int gt gt upLD new int LoggingDeleter lt int gt upFD std move upFD OKupFD std move upLD NOT OK fails to compile On the other hand we have no such issues with shared pointers std shared ptr lt int gt spFD new int FakeDeleter lt int gt std shared ptr lt int gt spFD new int FakeDeleter lt int gt std shared ptr lt int gt spLD new int LoggingDeleter lt int gt spFD spFD spFD spLD How is this possible For unique pointers the deleter is a class template parameter while for shared pointers it s only a template parameter in the constructor At the end of the day a deleter is stored as it was passed for unique pointers but shared pointers apply type erasure on it which also means an extra allocation on the heap and another layer of indirection This also makes shared pointers less performant than unique pointers In fact according to the measurements I saw in Hands On Design Patterns with C the performance overhead due to type erasure is by default more significant than reference counting On the other hand most of the negative performance impacts of erasing the deleter type can be optimized away with Local Buffer Optimization Without going into deep details on it it means that when the compiler allocated memory for the shared pointer it allocates a bit more so that it s enough for the deleter too and therefore no second allocation is needed Obviously reference counting cannot be optimized away ConclusionIn this article after having a small recap on smart pointers we discussed why unique pointers are cheaper than shared ones We saw that it s not only about reference counting which is probably the most well known cause but also about the erasure of the deleter type which might add even more to the differences Connect deeperIf you liked this article please hit on the like button subscribe to my newsletter and let s connect on Twitter 2022-06-08 09:01:56
海外TECH Engadget Disney's big holiday movie will skip French theaters in release window protest https://www.engadget.com/disneys-big-holiday-movie-will-skip-french-theaters-in-release-window-protest-091856798.html?src=rss Disney x s big holiday movie will skip French theaters in release window protestIn protest of France s content streaming rules Disney has announced that its animated holiday film Strange World aka Avalonia will go straight to Disney and not appear in theaters in the country It also gave a strong statement to Deadline decrying France s so called chronologie des medias rules nbsp Strange World will be available to all Disney subscribers in France foregoing a French cinematic release While we support French cinema ーand have for decades ーthe new cumbersome media chronology is anti consumer ignoring how behavior has evolved over the last several years and puts us at increased risk for piracy nbsp We will continue to make decisions on a film by film basis and according to each market s unique conditions a company spokesperson said nbsp France s laws force studios like Disney to wait months before they can release movies to Disney after a theatrical release following a four month purchase and exclusive six month Canal window Disney can then only keep it for five months as it goes to free to air channels like TF and France for a month period Once that window ends months after the theatrical release it reverts back to Disney nbsp Minister of CulturePrior to a new law implemented earlier this year the situation actually used to be worse for streaming channels with release windows much longer Disney has protested because the new rules favor Netflix giving it a shorter month window before films can revert to its streaming service It has also said that the laws don t take into account the new reality of how content is consumed in the COVID era nbsp We believe that the media chronology is not consumer friendly nor does it establish a balanced or proportionate framework between the various players in the French audiovisual ecosystem This is especially frustrating as we have been increasing our investment in the creation of original French content while also supporting French cinema through our theatrical releases Disney said at the time Engadget has reached out to France s media regulator for comment France s Ministry of Culture and regulatory body CNC juggle the needs of theater chains studios streaming services and consumers At the same time they re trying to encourage local production and original French content in general That has been effective of late with numerous productions like Emily in France shot in the country At the same time original French series like Netflix s Lupin and Call My Agent have become hits in the US and elsewhere around the world nbsp 2022-06-08 09:18:56
金融 ニッセイ基礎研究所 景気ウォッチャー調査(22年5月)~飲食、サービスを中心に、現状判断DI、先行き判断DIともに改善 https://www.nli-research.co.jp/topics_detail1/id=71360?site=nli 一方、景況感が悪化していると判断した回答者のコメントには、値上げ、上昇、高騰などの単語が多く含まれ、資源価格高騰や円安による値上げが言及される傾向がみられた。 2022-06-08 18:27:47
海外ニュース Japan Times latest articles Family of dead Sri Lankan detainee demands apology from Japan government https://www.japantimes.co.jp/news/2022/06/08/national/crime-legal/sri-lankan-detainee-family/ Family of dead Sri Lankan detainee demands apology from Japan governmentHer family also filed a criminal complaint with prosecutors against the immigration center s senior officials in November last year saying they failed to provide appropriate 2022-06-08 18:20:30
海外ニュース Japan Times latest articles Opposition CDP submits no-confidence motions ahead of election https://www.japantimes.co.jp/news/2022/06/08/national/politics-diplomacy/cdp-no-confidence-motions-ldp/ Opposition CDP submits no confidence motions ahead of electionCDP leader Kenta Izumi has lambasted Lower House speaker Hiroyuki Hosoda over sexual harassment allegations and targeted Prime Minister Fumio Kishida s response to price hikes 2022-06-08 18:11:43
海外ニュース Japan Times latest articles North Korean missile barrage adds new dimension to Japan’s threat assessment https://www.japantimes.co.jp/news/2022/06/08/national/north-korea-japan-defenses/ North Korean missile barrage adds new dimension to Japan s threat assessmentThe launch of eight missiles from four locations in the country builds on earlier training for a strike designed to overwhelm Japanese and South Korean 2022-06-08 18:09:06
ニュース BBC News - Home Unions branded selfish by No 10 over June rail strike plans https://www.bbc.co.uk/news/business-61726567?at_medium=RSS&at_campaign=KARANGA plansthe 2022-06-08 09:20:34
ニュース BBC News - Home PM under pressure to cut taxes after confidence vote https://www.bbc.co.uk/news/uk-politics-61726091?at_medium=RSS&at_campaign=KARANGA confidence 2022-06-08 09:42:49
ニュース BBC News - Home Berlin: One dead and others hurt as car drives into pedestrians https://www.bbc.co.uk/news/world-europe-61729102?at_medium=RSS&at_campaign=KARANGA attack 2022-06-08 09:46:30
ニュース BBC News - Home Florida: Bodycam footage shows officials borrowing boat to chase suspected thief https://www.bbc.co.uk/news/world-us-canada-61731562?at_medium=RSS&at_campaign=KARANGA florida 2022-06-08 09:17:27
ニュース BBC News - Home Cineworld cancels The Lady of Heaven film screenings after protests https://www.bbc.co.uk/news/business-61729392?at_medium=RSS&at_campaign=KARANGA muslim 2022-06-08 09:07:47
ニュース BBC News - Home Buy now, pay later: Warning over use of credit cards to cover payments https://www.bbc.co.uk/news/business-61719592?at_medium=RSS&at_campaign=KARANGA advice 2022-06-08 09:29:55
ニュース BBC News - Home Phil Mickelson: PGA Tour player refuses to deny he has been banned by American circuit https://www.bbc.co.uk/sport/golf/61730429?at_medium=RSS&at_campaign=KARANGA Phil Mickelson PGA Tour player refuses to deny he has been banned by American circuitPhil Mickelson refuses to deny that he has been banned by the PGA Tour on the eve of playing in the inaugural m Saudi funded LIV Golf event 2022-06-08 09:51:25
ビジネス ダイヤモンド・オンライン - 新着記事 ミアヘルサHD、「QUOカード」の株主優待を新設し、 配当+優待利回りが4%超に! 9月末に100株以上で 1000~3500円分の「QUOカード」がもらえることに! - 株主優待【新設・変更・廃止】最新ニュース https://diamond.jp/articles/-/304511 2022-06-08 18:20:00
ビジネス 不景気.com 福島・郡山の運送業「創明」に破産決定、負債7億円 - 不景気com https://www.fukeiki.com/2022/06/soua.html 株式会社創 2022-06-08 09:04:12
IT 週刊アスキー PS Plus会員は割引率が倍に!PS Storeで本日より開催の「DOUBLE DISCOUNTSセール」にケムコのRPGが4タイトル出品中 https://weekly.ascii.jp/elem/000/004/094/4094139/ doublediscounts 2022-06-08 18:45:00
IT 週刊アスキー JT、「Ploom X」専用のたばこスティック「メビウス・オプション・マスカットグリーン」を発売 https://weekly.ascii.jp/elem/000/004/094/4094134/ ploomx 2022-06-08 18:30:00
マーケティング AdverTimes 野村証券、マーケティング部を新設(22年7月1日付) https://www.advertimes.com/20220608/article386471/ 執行役員 2022-06-08 09:41:36

コメント

このブログの人気の投稿

投稿時間: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件)