js |
JavaScriptタグが付けられた新着投稿 - Qiita |
flashメッセージを実装(非同期通信) |
https://qiita.com/ad1117wi/items/9b089436e65564edd3ad
|
②flashメッセージが既に存在する場合は、それを消去するcreatejserbifdocumentgetElementByIdflashmessagedocumentgetElementByIdflashmessageremoveflashメッセージ表示中に続けてお気に入りアイコン押下した際、表示中のメッセージを消去して最新のメッセージを表示します。 |
2021-06-04 04:30:01 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
flashメッセージを実装(非同期通信) |
https://qiita.com/ad1117wi/items/9b089436e65564edd3ad
|
②flashメッセージが既に存在する場合は、それを消去するcreatejserbifdocumentgetElementByIdflashmessagedocumentgetElementByIdflashmessageremoveflashメッセージ表示中に続けてお気に入りアイコン押下した際、表示中のメッセージを消去して最新のメッセージを表示します。 |
2021-06-04 04:30:01 |
海外TECH |
Ars Technica |
Hugh Jackman recovers lost memories best kept hidden in Reminiscence trailer |
https://arstechnica.com/?p=1769554
|
reminiscence |
2021-06-03 19:33:25 |
海外TECH |
DEV Community |
What No One Told You About Z-Index |
https://dev.to/code2rithik/what-no-one-told-you-about-z-index-30hj
|
What No One Told You About Z IndexThe problem with z index is that very few people understand how it really works It s not that hard to understand but it if you ve never taken the time to read its specification there are almost certainly really important aspects that you re completely unaware of Don t believe me Well see if you can solve this problem The ProblemIn the following HTML you have three div elements and each div contains a single span element Each span is given a background color ーred green and blue respectively Each span is also positioned absolutely near the top left of the document slightly overlapping the other span elements so you can see which ones are stacked in front of which The first span has a z index value of while the other two do not have any z index set Here s what the HTML and basic CSS look like I ve also included a visual demo via Codepen with the full CSS below lt div gt lt span class red gt Red lt span gt lt div gt lt div gt lt span class green gt Green lt span gt lt div gt lt div gt lt span class blue gt Blue lt span gt lt div gt red green blue position absolute red background red z index green background green blue background blue Here s the challenge try to see if you can make the red span element stack behind the blue and green span elements without breaking any of the following rules Do not alter the HTML markup in any way Do not add change the z index property of any elementDo not add change the position property of any element To see if you can figure it out click the edit on Codepen link above and play around with it for a bit If you ve succeeded it should look like the example below The SolutionThe solution is to add an opacity value less than to the first the parent of the red Here is the CSS that was added to the image above div first child opacity If you re scratching your head right now in shock and disbelief that opacity would have any effect on which elements are stacked in front of which welcome to the club I was similarly shocked when I first stumbled upon this issue Hopefully the rest of this article will make things a little more clear Stacking OrderZ index seems so simple elements with a higher z index are stacked in front of elements with a lower z index right Well actually no This is part of the problem with z index It appears so simple so most developers don t take the time to read the rules so that seems to be the problem Every element in an HTML document can be either in front of or behind every other element in the document This is known as the stacking order The rules to determine this order are pretty clearly defined in the spec but as I ve already stated they re not fully understood by most developers When the z index and position properties aren t involved the rules are pretty simple basically the stacking order is the same as the order of appearance in the HTML OK it s actually a little more complicated than that but as long as you re not using negative margins to overlap inline elements you probably won t encounter the edge cases When z index is involved things get a little trickier At first it s natural to assume elements with higher z index values are in front of elements with lower z index values and any element with a z index is in front of any element without a z index but it s not that simple First of all z index only works on positioned elements If you try to set a z index on an element with no position specified it will do nothing Secondly z index values can create stacking contexts and now suddenly what seemed simple just got a lot more complicated Stacking Order Within the Same Stacking ContextHere are the basic rules to determine stacking order within a single stacking context from back to front The stacking context s root element Positioned elements and their children with negative z index values higher values are stacked in front of lower values elements with the same value are stacked according to appearance in the HTML Non positioned elements ordered by appearance in the HTML Positioned elements and their children with a z index value of auto ordered by appearance in the HTML Positioned elements and their children with positive z index values higher values are stacked in front of lower values elements with the same value are stacked according to appearance in the HTML Wrapping UpGetting back to the original problem I ve recreated the HTML structure adding comments within each tag indicating its place in the stacking order This order is assuming the original CSS lt div gt lt gt lt span class red gt lt gt lt span gt lt div gt lt div gt lt gt lt span class green gt lt gt lt span gt lt div gt lt div gt lt gt lt span class blue gt lt gt lt span gt lt div gt When we add the opacity rule to the first div the stacking order changes like so lt div gt lt gt lt span class red gt lt gt lt span gt lt div gt lt div gt lt gt lt span class green gt lt gt lt span gt lt div gt lt div gt lt gt lt span class blue gt lt gt lt span gt lt div gt span red used to be but it s changed to I ve used dot notation to show that a new stacking context was formed and span red is now the first element within that new context Hopefully it s now a little more clear why the red box moved behind the other boxes The original example contained only two stacking contexts the root one and the one formed on span red When we added opacity to the parent element of span red we formed a third stacking context and as a result the z index value on span red only applied within that new context Because the first div the one we applied opacity to and its sibling elements do not have position or z index values set their stacking order is determined by their source order in the HTML which means the first div and all the elements contained within its stacking context are rendered behind the second and third div elements Thank You and Keep Coding Y All |
2021-06-03 19:33:06 |
海外TECH |
DEV Community |
Random OSS Projects - Mongita, Charts.css, NocoDB, BlitzJS |
https://dev.to/sm0ke/random-oss-projects-mongita-charts-css-nocodb-blitzjs-al2
|
Random OSS Projects Mongita Charts css NocoDB BlitzJSHello Coders From time to time unrelated to my daily work I just browse different platforms or Github for nice and innovative projects All projects mentioned by this article are open source actively supported with at least one innovative element IMO Thanks for reading Content provided by App Generator Charts css CSS visualization framework no JS Mongita lightweight embedded document databaseBlitzJS MVC React Framework built on top of NextJSNocoDB turns any database into a smart spreadsheet Charts CSSCharts css is a modern CSS framework It uses CSS utility classes to style HTML elements as charts The nice part of this library is that no JS is required to render the charts All the information is edited in the HTML and the library showcase the chart using only CSS Charts css product pageBar Chart Sample official docs MongitaMongita is a lightweight embedded document database that implements a commonly used subset of the MongoDB PyMongo interface Mongita differs from MongoDB in that instead of being a server Mongita is a self contained Python library Mongita can be configured to store its documents either on disk or in memory According to the benchmark published on project README Mongita scores better than MongoDB in all metrics bulk insert get all docs get by ID Mongita product repo Blitz JSAs mentioned in the HOMEpage Blitz is a batteries included framework that s inspired by Ruby on Rails is built on Next js and features a Zero API data layer abstraction that eliminates the need for REST GraphQL The product comes with a few enhancements on top of NextJS which is already a great product Data Layer the need of an API is removed At build time Blitz automatically inserts an API call that runs the server code on the serverBuilt in Authentication Authorization and rd party auth supported via Passport js NocoDBNocoDB is an open source NoCode platform that turns any database into a smart spreadsheet Smart means collaborative edit with fine grained Access Control and password protected views Other features automatic build of API and GraphQL services Kanban Dashboards Page Customization with DYI Builder NocoDB product pageNocoDB Github repo k StarsThanks for reading For more resources please access React Dashboards a curated list published on Dev toNextJS Templates free amp commercial productsOpen source Dashboards provided by AppSeed |
2021-06-03 19:29:30 |
Apple |
AppleInsider - Frontpage News |
Four Apple designers poached by Jony Ive for LoveFrom |
https://appleinsider.com/articles/21/06/03/four-apple-designers-poached-by-jony-ive-for-lovefrom?utm_medium=rss
|
Four Apple designers poached by Jony Ive for LoveFromApple s former design chief Jony Ive has snapped up colleagues on his way out the door with the total at least four since he departed in The newest acquisition is Wan Si a designer who spent years with Apple working on Apple app icons buttons and home screens According to a source who spoke to The Information Wan Si joins three other former employees including Chris Wilson Patch Kessler and Jeff Tiller Wan and Wilson were previously part of Apple s human interface team dedicated to creating GUI elements such as icons and menus Both share a design credit for the Apple Health app icon on iOS Read more |
2021-06-03 19:46:24 |
Apple |
AppleInsider - Frontpage News |
Blackstone buying MacWorld, ComputerWorld publisher IDG for $1.3 billion |
https://appleinsider.com/articles/21/06/03/blackstone-buying-macworld-computerworld-publisher-idg-for-13-billion?utm_medium=rss
|
Blackstone buying MacWorld ComputerWorld publisher IDG for billionInvestment management company Blackstone will acquire International Data Group IDG ーand its portfolio of long running tech publications including MacWorld ーfor billion Credit IDGBlackstone signaled plans to purchase IDG from Oriental Rainbow a subsidiary of China Oceanwide Holdings Group on Thursday IDG is a market intelligence firm that also owns several technology publications Read more |
2021-06-03 19:16:09 |
Apple |
AppleInsider - Frontpage News |
Satechi's new Aluminum Hub & Stand is designed with iPad Pro in mind |
https://appleinsider.com/articles/21/06/03/satechis-new-aluminum-hub-stand-is-designed-with-ipad-pro-in-mind?utm_medium=rss
|
Satechi x s new Aluminum Hub amp Stand is designed with iPad Pro in mindSatechi has now released its latest iPad accessory the Aluminum Hub Stand that lives up to its hub name with a bevy of useful ports Satechi Aluminum Hub Stand Keyboard not included The new Satechi Aluminum Hub Stand is designed for any USB C equipped iPad including the latest iPad Air fourth generation and iPad Pro It starts folded into a compact brick but when needed the stand can swivel out to hold the iPad in position Read more |
2021-06-03 19:30:33 |
海外TECH |
Engadget |
United Airlines plans to add 15 Boom Supersonic jets to its fleet |
https://www.engadget.com/united-airlines-boom-supersonic-194556757.html?src=rss_b2c
|
overture |
2021-06-03 19:45:56 |
海外TECH |
Engadget |
Apple updates AirTags to address stalking concerns |
https://www.engadget.com/apple-airtags-privacy-update-193102233.html?src=rss_b2c
|
bluetooth |
2021-06-03 19:31:02 |
海外TECH |
Engadget |
Ubisoft will reveal whatever 'Rainbow Six Quarantine' is now at E3 |
https://www.engadget.com/ubisoft-forward-e3-rainbow-six-quarantine-siege-191500093.html?src=rss_b2c
|
obvious |
2021-06-03 19:15:00 |
医療系 |
医療介護 CBnews |
チームが機能していないと批判されたらどうするか?-多職種連携と信念対立(64) |
https://www.cbnews.jp/news/entry/20210603161104
|
作業療法 |
2021-06-04 05:00:00 |
ニュース |
BBC News - Home |
England v New Zealand: England fight back after Devon Conway's 200 for New Zealand |
https://www.bbc.co.uk/sport/av/cricket/57352214
|
England v New Zealand England fight back after Devon Conway x s for New ZealandWatch highlights as England fight back on day two of the first Test against New Zealand at Lord s following Devon Conway s double century |
2021-06-03 19:01:10 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ホテルが「固定賃料」に苦しむ理由、赤字転落シミュレーションを解説 - 観光・ホテル「6月危機」 |
https://diamond.jp/articles/-/273065
|
新型コロナウイルス |
2021-06-04 04:50:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ロイヤルホスト・てんや以上の大減収、ロイヤルHDの「問題2事業」 - ダイヤモンド 決算報 |
https://diamond.jp/articles/-/272937
|
|
2021-06-04 04:45:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ETF買い入れ縮小でも見えない「出口」、日銀が抱える難題 - 政策・マーケットラボ |
https://diamond.jp/articles/-/272974
|
日本銀行 |
2021-06-04 04:40:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
日本の最低賃金を1500円に引き上げたら起こる「三つの悪いこと」 - 今週もナナメに考えた 鈴木貴博 |
https://diamond.jp/articles/-/273063
|
引き上げ |
2021-06-04 04:35:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
生命保険や医療保険に加入する前に考えたい、現金と健康保険の使い方 - 初心者のための「老後資金」対策講座 |
https://diamond.jp/articles/-/273019
|
健康保険 |
2021-06-04 04:30:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
中国「3人目の出産容認」でも少子化止まらず!?若者の結婚が遅れる原因 - 莫邦富の中国ビジネスおどろき新発見 |
https://diamond.jp/articles/-/272932
|
一人っ子政策 |
2021-06-04 04:25:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
SNSの誹謗中傷をなくすための団体が自ら大炎上した、根本的な誤算とは - News&Analysis |
https://diamond.jp/articles/-/273062
|
newsampampanalysissns |
2021-06-04 04:20:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
韓国「女性にも徴兵制を」 軍縮小で世論に変化 - WSJ発 |
https://diamond.jp/articles/-/273148
|
韓国 |
2021-06-04 04:17:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
管理職よ、裸の王様になるな!企業戦士のよろいを脱ぐために必要な職場環境とは - News&Analysis |
https://diamond.jp/articles/-/271742
|
管理職よ、裸の王様になるな企業戦士のよろいを脱ぐために必要な職場環境とはNewsampampAnalysisジャーナリストの白河桃子氏は『働かないおじさんが御社をダメにするミドル人材活躍のための処方箋』の中で、変化を拒む人たちを「おじさん」と呼び、彼らが活躍するためには組織の風土を変える必要があると訴えている。 |
2021-06-04 04:15:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
菅原前経産相が「いまさら辞任」に至った理由 - ニュース3面鏡 |
https://diamond.jp/articles/-/273061
|
菅原氏を巡っては年、秘書を通じ有権者に香典などを提供していた問題が発覚。 |
2021-06-04 04:10:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
壮絶体験をした元教師が伝える「自分の気持ちと向き合う大切さ」 - ニュース3面鏡 |
https://diamond.jp/articles/-/273060
|
そこで初めて「自分の気持ちと向き合う大切さ」に気がついたといいます。 |
2021-06-04 04:05:00 |
北海道 |
北海道新聞 |
「YOASOBI」が上半期1位 人気アーティストランキング |
https://www.hokkaido-np.co.jp/article/551576/
|
yoasobi |
2021-06-04 04:02:00 |
ビジネス |
東洋経済オンライン |
車両お披露目「宇都宮LRT」、喜び一色でない現実 インフラ整備も進みつつあるが事業費大幅増加 | ローカル線・公共交通 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/432293?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
東洋経済オンライン |
2021-06-04 04:30:00 |
GCP |
Cloud Blog |
Serve a TensorFlow Hub model in Google Cloud with Vertex AI |
https://cloud.google.com/blog/topics/developers-practitioners/serve-tensorflow-model-google-cloud-vertex-ai/
|
Serve a TensorFlow Hub model in Google Cloud with Vertex AIGood artists copy great artists steal and smart software developers use other people s machine learning models If you ve trained ML models before you know that one of the most time consuming and cumbersome parts of the process is collecting and curating data to train those models But for lots of problems you can skip that step by instead using somebody else s model that s already been trained to do what you want like detect spam convert speech to text or label objects in images All the better if that model is built and maintained by folks with access to big datasets powerful training rigs and machine learning expertise One great place to find these types of “pre trained models is TensorFlow Hub which hosts tons of state of the art models built by Google Research that you can download and use for free Here you ll find models for doing tasks like image segmentation super resolution question answering text embedding and a whole lot more You don t need a training data set to use these models which is good news since some of them are huge and trained on massive datasets But if you want to use one of these big models in your app the challenge then becomes where to host them in the cloud most likely so they re fast reliable and scalable For this Google s new Vertex AI platform is just the ticket In this post we ll download a model from TensorFlow Hub and upload it to Vertex s prediction service which will host our model in the cloud and let us make predictions with it through a REST endpoint It s a serverless way to serve machine learning models Not only does this make app development easier but it also lets us take advantage of hardware like GPUs and model monitoring features built into Vertex Let s get to it Prefer doing everything in code from a Jupyter notebook Check out this colab Download a model from TensorFlow HubOn you ll find lots of free models that process audio text video and images In this post we ll grab one of the most popular Hub models the Universal Sentence Encoder This model takes as input a sentence or paragraph and returns a vector or “embedding that maps the text to points in space These embeddings can then be used for everything from sentence similarity to smart search to building chatbots read more about them here On the Universal Sentence Encoder page click “Download to grab the model in TensorFlow s SavedModel format You ll download a zipped file that contains a directory formatted like so universal sentence encoder assets saved model pb variables variables data of variables indexHere the saved model pb file describes the structure of the saved neural network and the data in the variables folder contains the network s learned weights On the model s hub page you can see it s example usage You feed the model an array of sentences and it spits out an array of vectors Without this example we can still learn about what input and output the model supports by using TensorFlow s SavedModel CLI If you ve got TensorFlow installed on your computer in the directory of the Hub model you downloaded run For this model that command outputs From this we know that our model expects as input a one dimensional array of Strings We ll use this in a second Getting started with Vertex AIVertex AI is a new platform for training deploying and monitoring machine learning models launched this year at Google I O For this project we ll just use the prediction service which will wrap our model in a convenient REST endpoint To get started you ll need a Google Cloud account with a GCP project set up Next you ll need to create a Cloud Storage bucket which is where you ll upload the TensorFlow Hub model You can do this from the command line using gsutil If this model is big this could take a while In the side menu enable the Vertex AI API Once your Hub model is uploaded to Cloud Storage it s straightforward to import it into Vertex AI following the docs or this quick summary On the Vertex AI “Models tab click import Choose any name for your model Choose a compatible version of TensorFlow to use with your model for newer models gt should work Select “GPU if you want to pay for GPUs to speed up prediction time Point “Model artifact location to the model folder you uploaded to Cloud Storage Click “Import Once your model is imported you ll be able to try it out straight from the models tab Click on the name of your model Here in the model page you can test your model right from the UI Remember how we inspected our model with the saved model cli earlier and learned it accepted as input an array of strings Here s how we can call the model with that input Once you ve verified your model works in the UI you ll want to deploy it to an endpoint so you can call it from your app In the “Endpoint tab click “Create Endpoint and select the model you just imported Voila Your TensorFlow Hub model is deployed and ready to be used You can call it via POST request from any web client or using the Python client library Now that we ve set our TensorFlow Hub model on Vertex we can use it in our app without having to think about most of the performance and ops challenges of using big machine learning models in production It s a nice serverless way to get building with AI fast Happy hacking Related ArticleWhat is Vertex AI Developer advocates share moreDeveloper Advocates Priyanka Vergadia and Sara Robinson explain how Vertex AI supports your entire ML workflowーfrom data management all t Read Article |
2021-06-03 19:30:00 |
コメント
コメントを投稿