投稿時間:2021-05-18 12:41:56 RSSフィード2021-05-18 12:00 分まとめ(51件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
ROBOT ロボスタ AIとDXの最先端オンラインイベント「ExaForum2021」(エクサフォーラム)開幕 展示会場とセミナー会場のようす https://robotstart.info/2021/05/18/exaforum2021-start.html exaforum 2021-05-18 02:45:38
ROBOT ロボスタ 自動除菌ロボット「R-Paca」(アールパカ) 大阪府内のホテルと連携して実証実験 除菌業務が必要な実際の現場で正常な動作を確認 https://robotstart.info/2021/05/18/r-paca-osaka-hotel.html rpaca 2021-05-18 02:04:41
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] メインで利用しているクレカ&コード決済、1位は? https://www.itmedia.co.jp/business/articles/2105/18/news074.html itmedia 2021-05-18 11:25:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 資生堂は復調傾向? 化粧品各社の「中国頼み」色濃く https://www.itmedia.co.jp/business/articles/2105/18/news027.html itmedia 2021-05-18 11:15:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 最も信頼するインフルエンサーランキング 3位「渡辺直美」「松本人志」、2位「ひろゆき」、1位は? https://www.itmedia.co.jp/business/articles/2105/18/news076.html itmedia 2021-05-18 11:12:00
IT ITmedia 総合記事一覧 [ITmedia News] ニチレイの冷凍食品自販機、撤去始まる 冷凍食品メニューは全て生産終了 https://www.itmedia.co.jp/news/articles/2105/18/news075.html hrhotmemu 2021-05-18 11:03:00
TECH Techable(テッカブル) 食事内容の記録もできる、そしゃく回数計「bitescan」 https://techable.jp/archives/154717 bitescan 2021-05-18 02:00:51
python Pythonタグが付けられた新着投稿 - Qiita 【Python】2次元行列の各要素にベクトルをかけて3次元の行列を作る https://qiita.com/bassie/items/71004b54040022f3ee70 2021-05-18 11:56:32
python Pythonタグが付けられた新着投稿 - Qiita Pythonista3: WikipediaのURLをWikipedia PageIDのURLに変換する https://qiita.com/ekemtt/items/63567d88045c596d2128 きっかけ詳細は初投稿の方に記載した通りです……が、そのことを思いついた時、ちょうど電車で長距離を移動しなければならないにも関わらず、パソコンを持ち歩かなかったために、最初にPythonistaを使ってソースコードを書いたのでした。 2021-05-18 11:22:17
js JavaScriptタグが付けられた新着投稿 - Qiita Electronの公式クイックスタートガイドを試す https://qiita.com/2929/items/4e574c71d56256753ae8 Electronで作成したアプリケーションは、macOS、Windows、Linuxで実行できます。 2021-05-18 11:43:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ios用広告の実装について https://teratail.com/questions/338913?rss=all ※バナー広告、インターステシャル広告、リワード広告の種ios用にて全広告はUnity上では作動しています。 2021-05-18 11:58:39
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) WordPress / Gutenbergでプラグインに複数ブロックを登録する方法 https://teratail.com/questions/338912?rss=all WordPressGutenbergでプラグインに複数ブロックを登録する方法Gutenbergの勉強を始めたばかりで理解度は低いです。 2021-05-18 11:51:16
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ruby on RAILS FACEBOOKログイン実装後、アプリIDが無効なものです https://teratail.com/questions/338911?rss=all rubyonRAILSFACEBOOKログイン実装後、アプリIDが無効なものですご存じる方助けて頂けたいです。 2021-05-18 11:45:22
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Google広告について https://teratail.com/questions/338910?rss=all ※バナー広告、インターステシャル広告、リワード広告の種Andoroid用にて空のアプリに各広告をテストすると全て表示されるのですが作成したゲームアプリに組み込むと全広告はUnity上では作動しているのだが実機でテストすると、全てが表示されない。 2021-05-18 11:45:16
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) EPELインストールエラーの解決方法(CentOS7) https://teratail.com/questions/338909?rss=all エラーを解消し、EPELをインストールする方法をご教授下さい。 2021-05-18 11:41:08
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) PDFダウンロードができない https://teratail.com/questions/338908?rss=all PDFダウンロードができないBackendで作成したPDFを、BFFを通してダウンロードしたいNuxtjsからNestjsにaxiosでリクエストを投げて、NESTJSで作成したPDFをブラウザでダウンロードする仕組みを作成しています。 2021-05-18 11:28:06
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Unity 2Dアクションゲームの落下でなぜかうまくいかないです。 https://teratail.com/questions/338907?rss=all UnityDアクションゲームの落下でなぜかうまくいかないです。 2021-05-18 11:27:33
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Powershellでショートカットのリンク先(参照先)の値を置き換えたい https://teratail.com/questions/338906?rss=all Powershellでショートカットのリンク先参照先の値を置き換えたい前提・実現したいことデスクトップのショートカットのリンク先参照先を変更したいと思っております。 2021-05-18 11:23:54
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) バッファキャッシュについて https://teratail.com/questions/338905?rss=all buffcache 2021-05-18 11:20:36
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【GCP】cloud functionsにはhandler関数は必要でしょうか? https://teratail.com/questions/338904?rss=all 【GCP】cloudfunctionsにはhandler関数は必要でしょうか現在、GCPnbspCloudnbspFunctionsnodejsを使用してサーバーレスアプリケーションを開発しています。 2021-05-18 11:11:46
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) openpyxlを用いてウェブサイトから取得したエクセルデータを既存ファイルに追加したい https://teratail.com/questions/338903?rss=all 実現したいことopenpyxlを用いて、ウェブサイトから取得したエクセルファイルAのデータを別の集計用エクセルファイルBに追加していきたいと考えております。 2021-05-18 11:09:52
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) vscodeで日本語が文字化けする https://teratail.com/questions/338902?rss=all exception 2021-05-18 11:09:16
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 条件にあったセルの集計をしたいです。 https://teratail.com/questions/338901?rss=all 2021-05-18 11:08:01
Ruby Rubyタグが付けられた新着投稿 - Qiita データベースの設定について https://qiita.com/danburudoa/items/6315301fab38c5d6d2b1 RubyonRailsは、このdatabaseymlを編集することで、データベースの設定を運用環境ごとに変更できる仕組みになっています。 2021-05-18 11:29:02
AWS AWSタグが付けられた新着投稿 - Qiita AWSサービス一覧(2021年) 気になったやつだけ インフラ編(1/2) https://qiita.com/get-latest-information/items/6e9d4cf97f27be8da436 データベースRDSフルマネージドなRDBサーバのサービス個のDBから選択が可能。 2021-05-18 11:44:23
AWS AWSタグが付けられた新着投稿 - Qiita PHP:Laravel Strageを利用した複数画像uploadする方法1つとFlysystem-aws-s3で複数画像をuploadする方法2つとその処理速度 https://qiita.com/saramandark/items/52ca5e36314bc08d5490 PHPLaravelStrageを利用した複数画像uploadする方法つとFlysystemawssで複数画像をuploadする方法つとその処理速度前提・AWSアカウントが存在していてSバケットが作成済である。 2021-05-18 11:21:14
AWS AWSタグが付けられた新着投稿 - Qiita AWS CLIのプロファイルを簡単切り替え https://qiita.com/itouuuuuuuuu/items/4d76591efc638668c41e sourceawspで現在のシェルで実行している箇所とnpmのパッケージの兼ね合いかと思うのですが、もし解決方法わかる方はアドバイスいただければ幸いです。 2021-05-18 11:13:45
Azure Azureタグが付けられた新着投稿 - Qiita azuriteを使ってローカルでtimer triggerを起動する https://qiita.com/uzresk/items/538c0f997faa736a75aa azuriteを使ってローカルでtimertriggerを起動するはじめにTimerTriggerをローカルで動かそうかなと思っていたらこんなエラーがでました。 2021-05-18 11:49:59
Ruby Railsタグが付けられた新着投稿 - Qiita データベースの設定について https://qiita.com/danburudoa/items/6315301fab38c5d6d2b1 RubyonRailsは、このdatabaseymlを編集することで、データベースの設定を運用環境ごとに変更できる仕組みになっています。 2021-05-18 11:29:02
技術ブログ Developers.IO リモートワーク下でもリード獲得ができる!タイオフィスによるウェビナー開催ノウハウ紹介セミナー https://dev.classmethod.jp/news/210611-thailand-webinar/ covid 2021-05-18 02:18:20
海外TECH DEV Community FED Talk! Episode 2: Material UI Theme https://dev.to/quintron/fed-talk-episode-2-material-ui-theme-44ma FED Talk Episode Material UI ThemeIn today s episode we will step through how to implement your applications theme using Material UI s Theme Provider We will configure everything from TypographyBreakpointsColoursButtonsHow to scaffold your AppLet s get started Table of Contents What s a Theme Theme SetupConfigure ThemeTypographyType ScaleFont SizingBreakpointsConfigurationAccessing BreakpointsCSS Media QueriesJS Media QueriesColour PaletteChoosing Your ColoursApply the PaletteButtonsScaffold Your AppApp BarBody ContentMain Menu NavigationClosing What s a Theme Themes are important as they define the look and feel of your overall application A good theme engine will allow the development team to configure things once centrally as opposed to repetitively The theme specifies the color of the components darkness of the surfaces level of shadow appropriate opacity of ink elements etc Themes let you apply a consistent tone to your app It allows you to customize all design aspects of your project in order to meet the specific needs of your business or brand To promote greater consistency between apps light and dark theme types are available to choose from By default components use the light theme type material ui Here s a good example where the Design Manager of GitHub Diana Mounter talks in depth about the struggles they had trying to make create a Dark theme and where creating a centralised theme earlier would have made their lives much easier When the design systems team at GitHub implemented their colour system in they were working with Sass trying to wrangle thousands of disconnected colour values into something more manageable to use Now they re revisiting colour again but this time with new tools new customer goals and more experience In the age of dark mode can what they ve learned from CSS in JS and component APIs help them in their approach to color themeability In this talk Diana covers lessons in color systems theming APIs and a bit of color theory along the way Find out more Theme SetupThe first thing to do is wrap your Application with MUI s ThemeProvider component src app tsximport CssBaseline ThemeProvider from material ui core export default function App return lt ThemeProvider gt Property theme is missing lt CssBaseline gt lt h gt Design System lt h gt lt ThemeProvider gt The above now wraps each of your app s child components with the Theme Provider thus exposing your theme via React s Context API which we will later learn how to use Let s now create a new folder in your src directory called theme Here is where we can store each of our theme configurations Create the following file src theme index tsximport createMuiTheme from material ui core export default createMuiTheme The output of createMuiTheme will create a Theme object which our newly added ThemeProvider Higher order Component HoC requires Let s plug it in src app tsximport CssBaseline ThemeProvider from material ui core import Theme from theme export default function App return lt ThemeProvider theme Theme gt lt CssBaseline gt lt h gt Design System lt h gt lt ThemeProvider gt Configure ThemeOne of the really neat benefits of using MUI is that their TypeScript definitions are well documented This is evident by using VSCode s Go to definition on any of their module exports for example if we dived into their createMuiTheme component you will see something like this node modules material ui core styles createMuiTheme d tsimport Breakpoints BreakpointsOptions from createBreakpoints import Mixins MixinsOptions from createMixins import Palette PaletteOptions from createPalette import Typography TypographyOptions from createTypography import Shadows from shadows import Shape ShapeOptions from shape import Spacing SpacingOptions from createSpacing import Transitions TransitionsOptions from transitions import ZIndex ZIndexOptions from zIndex import Overrides from overrides import ComponentsProps from props export type Direction ltr rtl export interface ThemeOptions shape ShapeOptions breakpoints BreakpointsOptions direction Direction mixins MixinsOptions overrides Overrides palette PaletteOptions props ComponentsProps shadows Shadows spacing SpacingOptions transitions TransitionsOptions typography TypographyOptions palette Palette gt TypographyOptions zIndex ZIndexOptions unstable strictMode boolean export interface Theme shape Shape breakpoints Breakpoints direction Direction mixins Mixins overrides Overrides palette Palette props ComponentsProps shadows Shadows spacing Spacing transitions Transitions typography Typography zIndex ZIndex unstable strictMode boolean export default function createMuiTheme options ThemeOptions args object Theme We now know how to interface into this module and populate the ThemeOptions TypographyIt s important to use the correct Typography for any given media whether it be for Print Digital Low High resolution devices Well defined typography should allow your viewers to clearly distinguish content and its formalities For example the font size of a H tag should be visually larger than that of a H likewise with H vs H and so on this is called Font Scaling Find out more on the Type System Let s pick some fonts using Google Fonts bold for our headings and one other for the rest of our app Step Find your desired header fontNavigate through their font library until you find one you like I m happy with Krona One Then click into the font s box to navigate and read more about the font s details Step Add the font to your Selected families trayProceeding with your font s selection make sure to click Select this style to add it to your tray Step Pair your font with one of their suggestionsA cool feature Google Fonts provide is that they give you a list of suggestive Pairings for your selected font If none of the pairings work for you go back to the home page and find another font Once you are happy make sure to add it to your tray Step Embed your fonts to your AppThe Selected families tray will then allow you to review your selected fonts as well as present you how to embed them in your App In this case I would use their proposed lt link gt implementation mostly because they provide the lt link rek preconnect gt line The preconnect declaration helps improve page load speeds by instructing the browser to connect with another origin thus hitting all of the connection constraints up front rather then when the actual resource request gets called Find out more Copy and paste their code snippet into the lt head gt block public index html lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset utf gt lt meta name description content Web site created using create react app gt lt meta name viewport content width device width initial scale gt lt meta name msapplication TileColor content f gt lt meta name theme color content f gt lt link rel apple touch icon sizes x href apple touch icon png gt lt link rel icon type image png sizes x href favicon x png gt lt link rel icon type image png sizes x href favicon x png gt lt link rel manifest href site webmanifest gt lt link rel mask icon href safari pinned tab svg color bfb gt lt link rel preconnect href gt lt link href family Krona One amp display swap rel stylesheet gt lt title gt Design System QuinTRON lt title gt lt head gt lt body gt lt noscript gt You need to enable JavaScript to run this app lt noscript gt lt div id root gt lt div gt lt body gt lt html gt This instructs the browser to request our Google fonts during the App s initial load The fonts themselves will only be apparent once we bind the CSS Font Families to our HTML To do this we ll need to extend our theme by adding a Typography configuration MUI s Typography component allow configuration for the following variants I ve added their default HTML element mapping as inline comments export type Variant h maps to lt h gt h maps to lt h gt h maps to lt h gt h maps to lt h gt h maps to lt h gt h maps to lt h gt subtitle maps to lt h gt subtitle maps to lt h gt body maps to lt p gt body maps to lt p gt caption maps to lt span gt button maps to lt button gt overline maps to lt span gt You can also change the default HTML mappings by implementing the following example theme index tsxconst theme createMuiTheme props MuiTypography variantMapping body span traditionally set as lt p gt body span traditionally set as lt p gt ️I highly recommend you read all of MUI s Typography definitions and rules for each of the Variants above They do a good job in explaining how when and where to use it in your App Read more hereWe can create our Typography file to configure each of the variants definitions stc theme typography tsximport TypographyOptions from material ui core styles createTypography export const typography TypographyOptions h fontFamily Krona One sans serif h fontFamily Krona One sans serif h fontFamily Krona One sans serif h fontFamily Krona One sans serif h fontFamily Krona One sans serif h fontFamily Krona One sans serif subtitle fontFamily Jura sans serif subtitle fontFamily Jura sans serif body fontFamily Jura sans serif body fontFamily Jura sans serif caption fontFamily Jura sans serif button fontFamily Jura sans serif overline fontFamily Jura sans serif Then add your Typography config to the Theme module src theme index tsximport createMuiTheme from material ui core import typography from typography export default createMuiTheme typography Your Google Font is now bound to MUI Typography components Let s add some content to our App and test out how it looks src app tsximport CssBaseline ThemeProvider from material ui core import Theme from theme export default function App return lt ThemeProvider theme Theme gt lt CssBaseline gt lt h gt Heading lt h gt lt h gt Heading lt h gt lt h gt Heading lt h gt lt h gt Heading lt h gt lt h gt Heading lt h gt lt h gt Heading lt h gt lt p gt Body content lt p gt lt button gt Button label lt button gt lt caption gt Caption text lt caption gt lt ThemeProvider gt This is what is looks like Hm I don t see my header font Ah huh it s because I was using the default HTML tags not MUI s Typography component Let s convert them like so src app tsximport Button CssBaseline ThemeProvider Typography from material ui core import Theme from theme export default function App return lt ThemeProvider theme Theme gt lt CssBaseline gt lt Typography variant h gt Heading lt Typography gt lt Typography variant h gt Heading lt Typography gt lt Typography variant h gt Heading lt Typography gt lt Typography variant h gt Heading lt Typography gt lt Typography variant h gt Heading lt Typography gt lt Typography variant h gt Heading lt Typography gt lt Typography variant body gt Body content lt Typography gt lt Typography variant body gt Body content lt Typography gt lt Typography variant subtitle gt Subtitle lt Typography gt lt Typography variant subtitle gt Subtitle lt Typography gt lt Typography variant caption gt Caption text lt Typography gt lt Typography variant overline gt Overline text lt Typography gt lt Button variant contained gt Button Contained lt Button gt lt Button variant outlined gt Button Outlined lt Button gt lt Button variant text gt Button Text lt Button gt lt ThemeProvider gt This is now what is looks like ️Now that s what the fonts should look like Type ScaleThe next obvious step is to implement font scaling across all of our Typography set to provide consistency across the app for all screen sizes and resolutions Font SizingMaterial UI uses rem units for the font size The browser element default font size is px but browsers have an option to change this value so rem units allow us to accommodate the user s settings resulting in a better accessibility support Users change font size settings for all kinds of reasons from poor eyesight to choosing optimum settings for devices that can be vastly different in size and viewing distance To change the font size of Material UI you can provide a fontSize property The default value is px Learn moreThere are two ways to set your app s Font Sizing Manually declaring each of the variants font sizes for each of your desired Break Points in your Typography file Using MUI s nifty responsiveFontSizes helper to do it for us For this example we will implement option as it reduces the amount of custom code we need to maintain and defines all the font sizes for us for each breakpoint An interactive demo on how this functionality works can be found hereAll we have to do is wrap our theme with their function theme index tsximport createMuiTheme responsiveFontSizes from material ui core import typography from typography export default responsiveFontSizes createMuiTheme typography Our font sizes are now responsive The following screenshots illustrate how the H s font size grows from mobile through to desktop each configured against the small sm medium md and large lg breakpoints breakpoint smbreakpoint mdbreakpoint lgMUI s design principle work off a Mobile First approach for example the font size style for Large breakpoint overrides that of the Medium and Small default font sizes If you wish to change the strength of the font size s resize amount between breakpoints you can add a factor option to the responsiveFontSizes function theme index tsximport createMuiTheme responsiveFontSizes from material ui core import typography from typography export default responsiveFontSizes createMuiTheme typography factor default is The higher the value the less difference there is between font sizes on small screens The lower the value the bigger font sizes for small screens The value must be greater than BreakpointsFor optimal user experience material design interfaces need to be able to adapt their layout at various breakpoints Material UI uses a simplified implementation of the original specification The breakpoints are used internally in various components to make them responsive but you can also take advantage of them for controlling the layout of your application through the Grid and Hidden components ConfigurationMUI s Theme implements the following default breakpoints xs extra small pxsm small pxmd medium pxlg large pxxl extra large pxI ve personally never had to change any of the Breakpoint settings even though you are able to reconfigure them Information on how to customize Breakpoints can be found here Take mental note of the breakpoint keys xs sm md lg xl as you will use them in the future Accessing BreakpointsWhen you get to the stage of developing components you ll eventually have to solve responsive layout issues to make your App accessible and as fluid as possible MUI offer many ways for you to interface into the Theme s breakpoint state whether you wish to statically style your component and its breakpoint changes or observe breakpoint changes in your Component to logically do something Let s go through some examples CSS Media QueriesFor this example imagine you have a Card component which has a heading some text and then a call to action Button at the bottom You are then tasked to style the Button against different breakpoints Pseudo train of thought breakpoints equal to or less than sm the button should span across the full width of the card breakpoints equal to or greater than md the button should anchor to the right using its original width breakpoints equal to or greater than lg the button should anchor to the right using its original width and its padding should be larger Final implemtation Example CSS Media Queriesconst styles theme gt button theme breakpoints down sm width theme breakpoints up md width auto theme breakpoints up lg paddingLeft rem paddingRight rem Few things to note breakpoints is a property exposed from our injected theme via the ThemeProvider HoC breakpoints have functions you can use to select your target breakpoints theme breakpoints up key theme breakpoints down key theme breakpoints only key theme breakpoints between start end Declare your breakpoints from smallest to largest as to retain MUI s Mobile First design principle By not doing this you could experience unexpected behavior JS Media QueriesFor this example imagine you have a Table which has many columns and is read from left to right This table reads really well on larger screens however the designer has rejigged the Table for mobile screens thus a second rendition of the Table should be rendered in this case Pseudo train of thought breakpoints equal to or less than sm should render the MobileTable otherwise the LargerTable should be rendered Final implementation Example JS Media Queriesimport useTheme from material ui core styles import useMediaQuery from material ui core useMediaQuery function TableWrapper const theme useTheme const mobileBreakpoint useMediaQuery theme breakpoints down sm if mobileBreakpoint return lt MobileTable gt return lt LargerTable gt Few things to note The useTheme hook is defined so the TableWrapper component has access to the app s Theme The useMediaQuery hook is defined and parameterized with my desired breakpoint for the hook to observe Its initial value is either true or false depending on the clients calculated dimensions useMediaQuery observe the windows Resize event and will internally recompute the hooks value if the theme s current breakpoint value changes Remember breakpoints down key breakpoints up key includes the key as part of its Boolean check Learn more on useMediaQuery Colour PaletteColour exists and most are fortunate to witness its array and uses in the world If used well it can promote your brand and cognitively remind people of your brand it can indicate a level of severity and attract the eye Ultimately colour has meaning MUI s Theme allow you to configure a palette which is a make up colour intention Here are the colour intentions and their uses primary used to represent primary interface elements for a user It s the colour displayed most frequently across your app s screens and components secondary used to represent secondary interface elements for a user It provides more ways to accent and distinguish your product Having it is optional error used to represent interface elements that the user should be made aware of warning used to represent potentially dangerous actions or important messages info used to present information to the user that is neutral and not necessarily important success used to indicate the successful completion of an action that a user triggered If you want to learn more about colour you can check out the colour section The following screenshot shows each colour intention and their default values Choosing Your ColoursMUI s the gift which just keeps giving The Material Design team have built a Color Tool which you can use to plug in your specific colours and visually see them against MUI s base components The tool also has an Accessibility feature which I encourage you to use as it will report the legibility of your colours Material Design Color ToolI will continue to use the Mechanical Rock brand colours Primary BFBSecondary EThe tool will automatically calculate the Light and Dark values from your provided main colour The Accessibility report suggests White Text on each of my Primary variants are not legible the same is mostly true for the Secondary variants Remind yourself of this in future Apply the PaletteOnce you have finalized your Primary and Secondary colours you can then configure them into your Theme We will create a new Palette file to manage this change like we did for Typography theme palette tsximport PaletteOptions from material ui core styles createPalette export const palette PaletteOptions primary light will be calculated from palette primary main main bfb dark will be calculated from palette primary main contrastText will be calculated to contrast with palette primary main secondary light will be calculated from palette primary main main e dark will be calculated from palette secondary main Used by getContrastText to maximize the contrast between the background and the text contrastThreshold Used by the functions below to shift a color s luminance by approximately two indexes within its tonal palette E g shift from Red to Red or Red tonalOffset As the comments in the above code snippet suggest you can let MUI calculate the Light Dark values for you for free otherwise manually add them for each Primary and Secondary objects Even if your chosen colours have been reported eligible in the Color Tool there is still a chance your foreground text does not contrast well against background shades on your surfaces The contrastThreshold property allows you to amplify or soften the contrast of your text against the background colour If you wish to dim the lights or make a colour more vivid during events such as hovering over a button you can tweak the amount against the tonalOffset property Let s add a colour section to our App by doing the following src ui ColourPalette index tsximport React from react import Box Grid Typography from material ui core function ColourBox intention variant intention string variant string const bgColor intention variant const color intention text background paper intention contrastText return lt Grid item xs sm gt lt Box bgcolor bgColor color color p gt lt strong gt bgColor lt strong gt lt Box gt lt Grid gt const palette intention primary variant main intention secondary variant main intention error variant main intention warning variant main intention info variant main intention success variant main intention text variant primary intention text variant secondary intention text variant disabled export default function ColourPalette return lt gt lt Typography variant h gt Colour Palette lt Typography gt lt br gt lt Grid container spacing gt palette map p i gt lt ColourBox key i p gt lt Grid gt lt gt Then add the new section to our App src app tsximport CssBaseline Divider ThemeProvider from material ui core import Theme from theme import ColourPalette from ui ColourPalette import Typography from ui Typographies export default function App return lt ThemeProvider theme Theme gt lt CssBaseline gt lt Typography gt lt Divider gt lt ColourPalette gt lt ThemeProvider gt You should end up seeing this ButtonsButtons allow users to take actions and make choices with a single tap material ui MUI offer variations of buttons Contained Text Outlined Contained ButtonContain buttons should be used for primary user actions They are pronounced and elevated on the surface Text ButtonText buttons are typically used for less pronounced actions including those located in Dialogs and Cards In cards text buttons help maintain an emphasis on card content Outlined ButtonOutlined buttons are medium emphasis buttons They contain actions that are important but aren t the primary action in an app Outlined buttons are also a lower emphasis alternative to contained buttons or a higher emphasis alternative to text buttons Let s add a button section to our App by doing the following ui Buttons index tsximport React from react import Button Container Typography from material ui core export default function Buttons return lt gt lt Typography variant h gt Buttons lt Typography gt lt br gt lt Container maxWidth xs gt lt Typography variant subtitle align center gt Contained lt Typography gt lt Button variant contained color default gt Default lt Button gt lt Button variant contained color primary gt Primary lt Button gt lt Button variant contained color secondary gt Secondary lt Button gt lt Button variant contained color primary disabled gt Disabled lt Button gt lt Container gt lt br gt lt Container maxWidth xs gt lt Typography variant subtitle align center gt Text lt Typography gt lt Button variant text color default gt Default lt Button gt lt Button variant text color primary gt Primary lt Button gt lt Button variant text color secondary gt Secondary lt Button gt lt Button variant text color primary disabled gt Disabled lt Button gt lt Container gt lt br gt lt Container maxWidth xs gt lt Typography variant subtitle align center gt Outlined lt Typography gt lt Button variant outlined color default gt Default lt Button gt lt Button variant outlined color primary gt Primary lt Button gt lt Button variant outlined color secondary gt Secondary lt Button gt lt Button variant outlined color primary disabled gt Disabled lt Button gt lt Container gt lt gt Don t forget to add it to your App tsx file to see the new content We should see something like this Scaffold Your AppSetting your app s initial layout can be daunting Even though most website layouts are quite consistent these days there is more than way to skin a cat Too many website implementations lack well schematic HTML making me think there is a gap of knowledge on this subject For example websites which have multiple H tags broken header hierarchy unnecessary div usage which should be replaced with better purposed tags Our goal as Front End developers is to make everything we build accessible Before we can start building out our layout we need to know where the main landmarks are Will the main menu navigation be on the top of the page will it be fixed or will it be anchored on the left of the page What type of content are you required to display Blog like content where content is best presented in the center channel or multimedia where content can be tiled For our case the scaffold will look like this for mobile And for desktop App BarThe App Bar displays information and actions relating to the current screen It provides content and actions related to the current screen It s used for branding screen titles navigation and actions Learn moreCreate a new file to manage your App Bar src components AppBar index tsximport React from react import AppBar as MuiAppBar IconButton Toolbar Typography from material ui core import MenuRounded from material ui icons export default function AppBar return lt MuiAppBar color primary position sticky gt lt Toolbar gt lt IconButton edge start aria label menu gt lt MenuRounded gt lt IconButton gt lt Typography variant h gt Component Library lt Typography gt lt Toolbar gt lt MuiAppBar gt Few things to note We have to cast the imported AppBar module to a new name MuiAppBar so that we are able to export our own version of the AppBar going forward We implement the position sticky prop against the MuiAppBar This is so the AppBar will stick to the top of the viewport even when you scroll beyond its initial position We implement the edge start prop against the IconButton This will apply some css to anchor the icon to the left minus its original margin offset We end up with this Body ContentHere is where most of your audience will spend their time discovering interacting or researching for information in your App The body content itself can obtain many layouts internally but what s important its abstract layer should be consistent Create a new file to manage your Body Content src components BodyContent index tsximport React from react import Divider makeStyles from material ui core import ColourPalette from ui ColourPalette import Typographies from ui Typographies const useStyles makeStyles gt root margin auto maxWidth rem padding rem export default function BodyContent const classes useStyles return lt main className classes root gt lt Typographies gt lt Divider gt lt ColourPalette gt lt main gt Few things to note We ve created our first CSS in JSS example We had to do this to define some styles against the root element of this component lt main gt makeStyles export the computed styles as a hook when we ve assigned to a scoped variable named useStyles useStyles is then declared inside the body of our BodyContent component so we have access to it margin auto will make sure the lt main gt block is centered in the pagemaxWidth rem will set the maximum width of the lt main gt block I felt represented a good readable column width for larger screens padding rem will apply a consistent rem gutter at the top and bottom of the lt main gt block We ve since migrated the Typographies and ColourPalette components from the app tsx file into this file Note the use of the HTML main Tag It s a more accurate tag to use in this case as it encapsulates the intent for the rest of the content Learn more on the main tagHere s a desktop screenshot of showing the box model of our lt main gt element Main Menu NavigationThe main menu is the primary way for users to navigate around your App It should contain all the main areas of the App and indicate where the user currently sits in the hierarchy Create a new file to manage your Main Menu Navigation src components MainMenu index tsximport React from react import Drawer List ListItem ListItemText from material ui core function MenuItems return lt List gt map item gt lt ListItem button key item gt lt ListItemText primary Menu Item item gt lt ListItem gt lt List gt type Props openMenu boolean setOpenMenu React Dispatch lt React SetStateAction lt boolean gt gt export default function MainMenu openMenu setOpenMenu Props return lt nav aria label main menu navigation gt lt Drawer anchor left disablePortal onClose gt setOpenMenu false open openMenu variant temporary gt lt MenuItems gt lt Drawer gt lt nav gt Few things to note We re using MUI s Drawer component to hold our Menu Items content anchor left prop is used to declare where we would like the Menu it transition from I ve personally declared disablePortal true here so the HTML lives inside of the lt nav gt element thus making it more accessible and schematically correct The onClose callback function gets invoked only if the background click away listener is present set by the variant temporary property open true will transition the Menu in and the opposite will transition the Menu out We then have to colocate the MainMenu with our AppBar component as it has the Menu button we need to wire up src components AppBar index tsximport React from react import AppBar as MuiAppBar IconButton Toolbar Typography from material ui core import MenuRounded from material ui icons import MainMenu from MainMenu export default function AppBar const openMenu setOpenMenu React useState false return lt gt lt MuiAppBar color primary position sticky gt lt Toolbar gt lt IconButton edge start aria label menu onClick gt setOpenMenu state gt state gt lt MenuRounded gt lt IconButton gt lt Typography variant h gt Component Library lt Typography gt lt Toolbar gt lt MuiAppBar gt lt MainMenu openMenu openMenu setOpenMenu setOpenMenu gt lt gt We can better manage this type of state using React s Contextual API This will be covered in a future episode We end up with this ClosingAt this stage your application should be wrapped with a Theme Provider You should have enough knowledge on how to override the styles of MUI components as well as how to create your own styles along side your own components You are now ready to move onto the next episode where I ll be walking you through how to implement Routing in your app covering the following topics How to setup Routing in your app Routes with parameters Route hooks Route transitionsDon t be shy get in touch with us 2021-05-18 02:51:25
海外TECH DEV Community Two-hundred eleven. https://dev.to/baenencalin/two-hundred-eleven-1d8l Detail Nothing 2021-05-18 02:28:48
海外TECH DEV Community Cheatsheet for the Regex Cheatsheet, Part VI: Escape Sequences https://dev.to/mathlete/cheatsheet-for-the-regex-cheatsheet-part-vi-escape-sequences-3ajp Cheatsheet for the Regex Cheatsheet Part VI Escape Sequences IntroI was recently doing a code challenge for a job interview that required me to strip out all nonalphabetic characters Ah I should use Regular Expressions for this I thought in triumph impressed that I even knew what regular expressions were That fleeting moment of glory faded once I decided to brush up on regular expressions and landed on the encouragingly named Regular Expressions Cheatsheet I had no idea how to use it So for people like me here is a Cheatsheet for the Regular Expressions Cheatsheet Part VI Escape Sequences What s an Escape Sequence Regular Expressions are typically used to search for characters or sequences of characters This process is straightforward for a regular character such as a number or letter but what if you re searching for a character that has special meaning in code such as an To tell the interpreter that you mean the literal character instead of the wildcard property of you escape the character by placing a in front of it Anatomy of a regular expressionForward slashes go on either end like so something Add g for global at the end to find every instance like so something gAdd m to multi line to the beginning end of each line not just the beginning end of each string like something g or something gm Escape SequencesI m going to illustrate the next few concepts with Mozilla s exceptionally clever wordmark which is moz a Escape following character is used in to find the following Mozilla s wordmark is moz aExample on regex comExample in Javascript let sentence Mozilla s wordmark is moz a let regex let found sentence match regex console log found index input Mozilla s wordmark is moz a groups undefined Ok but what if Mozilla changed their wordmark from moz a to moz a Let s try it that way is used in to find the following What if Mozilla changed their wordmark from moz a to moz a Example on regex com For some strange reason on regex will only find the first see example To find both the regex needs to be see exampleExample in Javascript Note To make this work the string needs to spell the wordmark as moz a let sentence What if Mozilla changed their wordmark from moz a to moz a let regex let found sentence match regex console log sentence What if Mozilla changed their wordmark from moz a to moz a console log found index input What if Mozilla changed their wordmark from moz a to moz a groups undefined Well I think we now know why Mozilla went with moz a instead of moz a Regex Escape Sequences that are not supported in Javascript Q Begin literal sequence E End literal sequence 2021-05-18 02:27:28
海外TECH DEV Community Quick notes to use the serverless framework to deploy a Node project on AWS https://dev.to/rounakcodes/quick-notes-to-use-the-serverless-framework-to-deploy-on-aws-3kaj Quick notes to use the serverless framework to deploy a Node project on AWS Introserverless framework consists of an open source CLI and a hosted dashboard to provide you with full serverless application lifecycle management The purpose of the article is to provide you a quick configuration to get started with it Install serverless clinpm i g serverless Configure serverless to use AWSserverless config credentials provider aws key lt access key id gt secret lt secret access key gt profile lt profileName gt If you do not wish to provide secrets in the shell use aws credentials file to save credentials in the following format lt Enter profile name here gt aws access key id aws secret access key lt Enter another profile name here gt aws access key id aws secret access key Create a new project nodejs serverless create template aws nodejs path myServerlessProjectThe following files are created handler js npmignoreserverless ymlIn serverless yml add profile and region Deploy to AWSIn a shell runsls deployAfter every change in serverless yml you must run this command to deploy the changes Add a S bucketIn serverless yml add Add a pluginIn a shell runnpm i save serverless s syncIn serverless yml add Configure the pluginExample configuration for ssync plugin Add lambda functionsIn serverless yml add Enable debug when deployingIn a shell runSLS DEBUG sls deploy Example config of serverless yml 2021-05-18 02:07:11
Apple AppleInsider - Frontpage News Mini LED production woes push 12.9-inch iPad Pro orders into July https://appleinsider.com/articles/21/05/18/mini-led-production-woes-push-129-inch-ipad-pro-orders-into-july?utm_medium=rss Mini LED production woes push inch iPad Pro orders into JulyApple manufacturing partners are reportedly facing difficulties producing key components for top tier models of the recently announced iPad Pro lineup pushing availability of the flagship tablet into July Unveiled at a special media event in April the new iPad Pro line features the top end inch iPad Pro with Liquid Retina XDR display Production of the screen packed with mini LED technology is reportedly causing unexpected supply delays Citing sources familiar with the matter Bloomberg reports Apple partners are struggling to manufacture the intricate inch screen in large quantities Unlike traditional LCD screens the Liquid Retina XDR groups mini LEDs into distinct dimming zones to achieve an extremely high contrast ratio Read more 2021-05-18 02:56:46
海外TECH CodeProject Latest Articles GFX Forever: The Complete Guide to GFX for IoT https://www.codeproject.com/Articles/5302085/GFX-Forever-The-Complete-Guide-to-GFX-for-IoT drawing 2021-05-18 02:17:00
金融 ニッセイ基礎研究所 「三角関数」と「波」の関係-三角関数による「波」の表現と各種の波(電磁波、音波、地震波等)- https://www.nli-research.co.jp/topics_detail1/id=67789?site=nli パターンが周期的である周期性を有する波動が一般的に取り扱われるが、このような場合、先の正弦曲線や余弦曲線といった三角関数のグラフをベースにして、これらにいくつかの要素を反映させたものを重ね合わせることで表すことができる。 2021-05-18 11:35:24
海外ニュース Japan Times latest articles As fourth wave spreads, local governments in Japan prep mass vaccination sites https://www.japantimes.co.jp/news/2021/05/18/national/local-government-vaccination/ administer 2021-05-18 11:42:03
ニュース BBC News - Home Coronavirus: Ministers to step up vaccine take up calls amid variant fears https://www.bbc.co.uk/news/uk-57152901 bolton 2021-05-18 02:09:36
LifeHuck ライフハッカー[日本版] AppleのBluetooth追跡デバイス「AirTag」の使い方ガイド https://www.lifehacker.jp/2021/05/234513how-to-use-airtags.html airtag 2021-05-18 12:00:00
北海道 北海道新聞 路線バスが電柱に衝突、北九州 十数人搬送 https://www.hokkaido-np.co.jp/article/545022/ 路線バス 2021-05-18 11:11:52
北海道 北海道新聞 ガザ空爆、医療施設も被害 イスラエル、攻撃続行を宣言 https://www.hokkaido-np.co.jp/article/545005/ 医療施設 2021-05-18 11:19:00
北海道 北海道新聞 トヨタ株が上場来高値、6年ぶり コロナ打撃から業績回復で更新 https://www.hokkaido-np.co.jp/article/545024/ 上場来高値 2021-05-18 11:18:46
北海道 北海道新聞 カーリング、日本は黒星スタート 混合世界選手権 https://www.hokkaido-np.co.jp/article/545003/ 世界選手権 2021-05-18 11:01:36
北海道 北海道新聞 再び相振り飛車に 女流王位戦第2局 https://www.hokkaido-np.co.jp/article/545050/ 倉敷藤花 2021-05-18 11:14:00
北海道 北海道新聞 米大統領、「停戦を支持」伝達 イスラエル首相と電話会談 https://www.hokkaido-np.co.jp/article/545043/ 米大統領 2021-05-18 11:07:00
北海道 北海道新聞 NY、マスク着用義務の解除へ 隣接州と対応割れる https://www.hokkaido-np.co.jp/article/545044/ 隣接 2021-05-18 11:13:00
北海道 北海道新聞 おかえりモネ初回19・2% NHK朝ドラ視聴率 https://www.hokkaido-np.co.jp/article/545042/ 視聴率 2021-05-18 11:01:00
IT 週刊アスキー フェンダー×FFXIVコラボレーション、「FINAL FANTASY XIV Stratocaster」限定生産 https://weekly.ascii.jp/elem/000/004/055/4055229/ ffxiv 2021-05-18 11:30:00
IT 週刊アスキー 横浜スタジアムに伝説OBがくるぞ!! ベイスターズ交流戦にて打席対決「交流戦 SERIES 2021」開催決定 https://weekly.ascii.jp/elem/000/004/055/4055235/ series 2021-05-18 11:20:00
マーケティング AdverTimes 細川美和子氏、橋田和明氏らが審査委員長に、「2021 61st ACC TOKYO CREATIVITY AWARDS」 https://www.advertimes.com/20210518/article350264/ acctokyocreativityawards 2021-05-18 02:30:49

コメント

このブログの人気の投稿

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

投稿時間:2024-02-12 22:08:06 RSSフィード2024-02-12 22:00分まとめ(7件)