投稿時間:2023-07-25 23:19:56 RSSフィード2023-07-25 23:00 分まとめ(25件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Techable(テッカブル) マーターポートら、世界遺産・高野山の聖地「壇上伽藍」をデジタルツイン化。文化財維持や観光誘客に期待 https://techable.jp/archives/213934 matterportinc 2023-07-25 13:00:15
python Pythonタグが付けられた新着投稿 - Qiita ChatGPTでプログラミング学習をする際の大事なこと https://qiita.com/ChocoRico/items/bb3765dd6b2a57941266 chatg 2023-07-25 22:36:07
python Pythonタグが付けられた新着投稿 - Qiita PythonでWord(.docx)のネストされた表を取得する https://qiita.com/walfiesfan/items/f705e99c08cd8672a00a pythondocx 2023-07-25 22:22:36
Ruby Rubyタグが付けられた新着投稿 - Qiita ChatGPTでプログラミング学習をする際の大事なこと https://qiita.com/ChocoRico/items/bb3765dd6b2a57941266 chatg 2023-07-25 22:36:07
golang Goタグが付けられた新着投稿 - Qiita 【Go】config.iniファイルの読み込み https://qiita.com/Takuya__/items/9deea8b36817e57e61af config 2023-07-25 22:33:06
Git Gitタグが付けられた新着投稿 - Qiita モノレポ管理していたFrontend/Backendで分けたくなった場合のやり方 https://qiita.com/baramatsubonzo/items/b3e1b87fe6acd51d0beb backend 2023-07-25 22:08:01
Ruby Railsタグが付けられた新着投稿 - Qiita ChatGPTでプログラミング学習をする際の大事なこと https://qiita.com/ChocoRico/items/bb3765dd6b2a57941266 chatg 2023-07-25 22:36:07
技術ブログ Developers.IO re:Postのランキングで1位になったけど、やりすぎでスパムだと誤解されてしまった話 https://dev.classmethod.jp/articles/repost-no-1-in-ranking/ repost 2023-07-25 13:58:00
海外TECH Ars Technica GM announces a new Ultium-based Chevrolet Bolt during Q2 report https://arstechnica.com/?p=1956353 chevrolet 2023-07-25 13:36:14
海外TECH Ars Technica Researchers find deliberate backdoor in police radio encryption algorithm https://arstechnica.com/?p=1956349 algorithmvendors 2023-07-25 13:05:32
海外TECH DEV Community Higher Order Function (HOF) in JavaScript https://dev.to/diwakarkashyap/higher-order-function-hof-in-javascript-10b1 Higher Order Function HOF in JavaScriptA high order function is a function which takes other function as an argument and Returns function the other and simple definition is A high order function in programming is a function that does at least one of the following Takes one or more functions as arguments i e procedural parameters Returns a function as its result High order functions are a key part of functional programming and they re also used quite widely in more imperative style programming High order functions allow us to create more generic functions reduce code duplication and can lead to code that is easier to read and maintain Here s an example of a high order function in JavaScript function map arr func let result for let i i lt arr length i result push func arr i return result let array let square function x return x x console log map array square Outputs In this case map is a high order function because it takes a function func as an argument This high order function applies the function func to every element in the array arr and returns a new array with the results Thank you for reading please follow me on Twitter i regularly share content about Javascript and React and contribute to Opensource ProjectsTwitter Github 2023-07-25 13:39:10
海外TECH DEV Community Fluid vs. responsive typography with CSS clamp https://dev.to/logrocket/fluid-vs-responsive-typography-with-css-clamp-4j13 Fluid vs responsive typography with CSS clampWritten by Cristian Diaz️Typography is a very important aspect of a website setting the tone and adding aesthetic appeal The use of typographic elements like scale spacing and size can impact usability readability and accessibility In this article we ll focus on the first element scale Typography scale can provide a sense of rhythm and hierarchy to a website but it also impacts how a font looks on different screen sizes A font size that looks optimal on wide screens may look too large on smaller screens This is where the concept of fluid typography helps In this article we ll discuss how to use modern CSS techniques to optimize fonts for different screen sizes We ll also investigate some tools that can be used to help create fluid typography scales Jump ahead Traditional approach Responsive typography Modern approach Fluid typography using CSS clamp How is fluid typography for accessibility Creating a fluid typography scale Using tools to create a fluid typography scale Using CSS to create a fluid typography function Fluid typography and container queries Traditional approach Responsive typographyIn the past developers have approached the issue of creating responsive typography by using media queries to change the font size property at different breakpoints Here s an example root font size rem px Between px and px media screen and min width rem and max width rem root font size rem px Between px and px media screen and min width rem and max width rem root font size rem px px or bigger media screen and max width rem root font size rem px Applying the font size body font size var font size This code will make a website s font size adapt to fit different size screens at least in theory However the result may feel a bit clunky text may appear too small on some screens and too large on others If you use this approach be sure to test how your end result looks and adjust if necessary Responsive typography is not the main focus of this article though If you want to better understand how responsive typography works I recommend checking out this article by Ryan Feigenbaum he even shares a Sass plugin that makes working with this approach easier Just keep in mind that the responsive typography approach exists and while it has its downsides it s still good for some use cases Modern approach Fluid typography using CSS clamp Now that we ve seen the limitations of responsive typography it s time to discuss a more flexible way to create typography that responds to screen size more easily ーusing CSS s clamp function to create fluid typography This function lets us set three values minimum preferred and maximum This means that we can set a value that will fluctuate between the minimum and maximum value but will always try to set the preferred value if possible To use the clamp function to create fluid typography we need to add a preferred value that adapts to screen size We can accomplish this using the vw unit to create a font size that adapts to the user s screen like so body font size clamp rem vw rem In this example which we ll refer to throughout the article the font size will fluctuate between px and px and the default size will be of the screen s width This simple approach can help us to create completely fluid font sizes that will adapt to any size screen In addition the clamp function is well supported meaning it s a very robust solution for creating fluid typography How is fluid typography for accessibility Fluid typography is not without caveats The example we just looked at has a big accessibility problem As Adrian Roselli points out in his article “Responsive Type and Zoom the vw unit does not respond well to zoom functionality If we rely solely on vw for our font size it won t increase when the user tries to scale the font by zooming in on screen This creates a serious accessibility problem as it does not meet WCAG criteria for resizing text We can solve this by using a CSS unit that scales with zoom like rem What we need to do is make the preferred value a combination of a vw value and a rem value This approach considers both screen width and user preferences when scaling Let s revisit our previous example and make the font size scale with both screen width and user preference considerations in mind We ll need to do something like this body clamp rem calc rem vw rem With this approach it s still important to test the results yourself to ensure the font scales correctly Even if it should work in theory it could have unexpected behavior that is worth considering Creating a fluid typography scale We previously discussed creating a fluid typography scale with the CSS clamp function in general terms but there are other questions we still need to consider For example we ll need to determine how to select a proper medium value that scales well with screen sizes and consider what other factors might be needed This is especially important for projects that use multiple font sizes usually tied to a font scale to create a sense of hierarchy and rhythm within a website There are a couple of ways that we can approach this task We can use tools that create a fluid typography scale or we can use Sass to create a function that enables us to create a typography scale using the clamp function We ll discuss both options in this article Neither is necessarily better than the other one makes the job easier but the other can be useful if you re creating a tool or library for your team so it s up to you to decide which approach to select Using tools to create a fluid typography scale Some websites let us create a typography scale quite easily One of the most well known is the Utopia fluid type scale calculator that uses the following information to create a typography scale Minimum and maximum screen size that the typography should scale The minimum and maximum font sizes to consider as a base calculation The font scale to consider for minimum and maximum screen sizes Utopia has a list of predetermined scales we can use and we can also use different font scales for our minimum and maximum font sizesHere s an example showing how the Utopia generator looks After adding our desired font sizes scales and viewport widths the tool will provide a list of CSS custom properties that use the clamp function to create a scale link lt amp s s l amp g s l xl gt root step clamp rem calc rem vw rem step clamp rem calc rem vw rem step clamp rem calc rem vw rem step clamp rem calc rem vw rem step clamp rem calc rem vw rem step clamp rem calc rem vw rem step clamp rem calc rem vw rem step clamp rem calc rem vw rem There are other tools that we can consider as well One of my favorites is this Fluid Type Scale calculator made by Aleksandr Hovhannisyan it offers more granular control and allows us to create a naming system for our custom properties Another tool to consider is the Min Max Value Interpolation calculator ーit lets us create a calculation for a specific element instead of creating an entire scale This is useful for specific cases like creating text that looks small on smaller screens but is really big on wider screens or even for creating a font that decreases in size as the screen becomes wider This can be achieved with the previous tools but we d have to copy the entire scale ーhaving a tool for these specific cases is more practical Using CSS to create a fluid typography function Aleksandr Hovhannisyan wrote a great article about using clamp for fluid typography In this article he covered a topic that is worth sharing the math behind typography calculations Following Aleksandr s guide let s look at an example to better understand how the math behind typography works For our example let s create a font size that is px on px screens and px on px screens Here s how this font would increase with screen size What we need to determine here is the rate of increase Because the increase is linear we can use the slope intercept equation y mx b According to Aleksandr we can find the slope of the line by using the above equation and considering the difference between max and min font sizes y values and the difference between the max and min viewport widths x values Here s the math we ll need to follow to determine the slope in the font size interpolation m px px px px m m Once we know the slope m we can plug it into the y mx b formula along with any x and y values to solve for the y axis intercept b Here we use px for the y value and px for the x value px px bb px pxb px px pxWe now have the pixel value and the slope value To express the slope as a valid vw unit we ll need to multiply it by meaning the slope is rounded up to body font size clamp px vw px px Next we can convert it to a rem value by dividing it by body font size clamp rem vw rem rem As Aleksandr points out once we understand this logic we can create a function in Sass that allows us to apply these calculations to create fluid typography The detail involved in creating a library for fluid type scaling is a bit beyond the scope of this article but I recommend checking out Aleksandr s article “Creating a Fluid Type Scale with CSS Clamp Creating a custom fluid type scale library may be helpful for future projects so keep this in mind as a possibility You can also use tools to create a fluid typography scale as we demonstrated earlier in this article Fluid typography and container queries Fluid typography can be very helpful but there may be cases that require more granular control and calculating the font size according to the viewport s width is not the best option Instead we may want to calculate font size using the container s width this is where we can combine fluid typography with container queries Let s consider an example where we have two cards At a certain point one of the cards will maintain the same width while the other will occupy the remaining space ーmaking the smaller card look like a sidebar of sorts Here are the font sizes we ve created with the clamp function root fs clamp rem rem vw rem fs clamp rem rem vw rem Here s the result when we apply these font sizes to our example This doesn t look great right The smaller card s title is too large Fortunately we can use container queries to improve the card s appearance First we need to let the browser check a respective container to start measuring its width We can do that with the container type property li container type inline size Next we ll need to add a couple of custom properties that check the container s width instead of the viewport s width so we ll need to replace the vw unit with the cqi container query inline unit We could also use the cqw container query width unit but it is not very but it is not very friendly for internationalization We ll give the new properties the same name but we ll add the container prefix root fs clamp rem rem vw rem fs clamp rem rem vw rem container fs clamp rem rem cqi rem container fs clamp rem rem cqi rem You ll notice that our calculation is the same the change resides only in respect to the width s unit Now let s apply this property to our containers li h font size var container fs li p font size var container fs Here s the result With the new custom properties the font sizes are appropriate for the size of the card The smaller card s title in particular has a much more reasonable font size You can check this example in this CodePen See the Pen Fluid typography and container queries by Cristian Diaz ItsCrisDiaz on CodePen Wrapping upFluid typography can be helpful for keeping website text readable and proportional for different screen sizes It s also easy to implement with different readily available tools In this article we demonstrated how to use modern CSS to achieve a more consistent result that respects the container s width with only a few extra lines of code When using this approach it s always a good idea to add a fallback for browsers that do not support container queries Also be sure to test the accessibility of your fluid typography because it may not have the behavior you expect As long as you ensure your site remains accessible fluid typography is a very helpful tool to use in your projects Is your frontend hogging your users CPU As web frontends get increasingly complex resource greedy features demand more and more from the browser If you re interested in monitoring and tracking client side CPU usage memory usage and more for all of your users in production try LogRocket LogRocket is like a DVR for web and mobile apps recording everything that happens in your web app mobile app or website Instead of guessing why problems happen you can aggregate and report on key frontend performance metrics replay user sessions along with application state log network requests and automatically surface all errors Modernize how you debug web and mobile apps ーStart monitoring for free 2023-07-25 13:25:57
海外TECH DEV Community Domain Modelling in the Cloud & AWS CDK https://dev.to/jesterxl/domain-modelling-in-the-cloud-aws-cdk-2806 Domain Modelling in the Cloud amp AWS CDKGregor Hohpe discusses Domain Driven Design in Cloud and hits important topics How the words you use enable design and indicate what type of work culture you re in and incentives to use better words How bad and difficult it is for Cloud providers to keep a consistent language and to what degree they ve created a decent set of words to describe their services and how they could do better How most people do NOT get how to use AWS CDK I think is the biggest take away for me I spent way too much time trying to utilize Dhall to create a domain specific language for each project and translate that to CloudFormation Instead of thinking in Lambdas and Step Functions you would use the language of the problem we re trying to solve the business of getting a Client s Accounts into a bunch of PDF Financial Statements that we could then put into a zip file called a StatementsZIP and deliver to a customer s FTP server Everything was modeled I ensured low level details such that you could NOT screw up us east vs us west with the compiler ensuring everything was correct No need to “test if you could fail over to west from east the compiler ensured that in seconds Ultimately Dhall wasn t verbose enough nor was I Dhall ninja but something like TypeScript or ReScript probably would have been better This idea of using Domain Modelling not just for language but ensuring the compiler helps you ensure your cloud application works was kind of the point of the AWS CDK However whether Object Oriented or Functional many people do NOT spend a lot of time domain modelling Thinking long and hard with the team about a function name Sure Great thing to do and clearly on the path of DDD but creating a single language that everyone agree s to use is key Having words for a Financial Statement is frustrating causes confusion and leads to bugs that could have been fixed if people just agreed to use the same word for a thing Gregor s article gives you a high level on the problems and it s clear open source and marketing have a hard job in continuing to show why AWS CDK enables different and better infrastructure as code options compared to AWS SAM or Serverless Framework I m almost inspired to try again for my ReScript to CloudFormation compiler… 2023-07-25 13:07:48
海外TECH DEV Community Intl.Segmenter(): Don't use string.split() nor string.length https://dev.to/ayc0/intlsegmenter-dont-use-stringsplit-nor-stringlength-dh6 Intl Segmenter Don x t use string split nor string lengthTL DRExplanationDefinitionsUTF String prototype lengthUnicode compositionEmoji SequenceIntl SegmenterBrowser compatibilityThe other day I was playing with JS and I saw this é length é length not the same output as the line before é split join e ́ Yes all of those are valid you can copy paste them TL DRAs an image is worth words You can use Intl Segmenterconst seg new Intl Segmenter en granularity grapheme seg segment length seg segment é length ExplanationThis article will talk about character vs code unit vs code point vs grapheme vs glyph Definitions Character generic term that can mean any of the other terms Code Unit A code unit is the smallest unit of data in UTF encoding In UTF each code unit is bits bytes in size It can represent a part of a character or a complete character depending on the character s Unicode value Code Point A code point is a numerical value assigned to a specific character in the Unicode standard It s a unique identifier for each character and is typically represented in hexadecimal For example the code point for the letter A is U In UTF every code point is composed by either or code unit Grapheme A grapheme is the smallest unit of a writing system that carries meaning and represents a single user perceived character In UTF every grapheme is composed by at least code point Not all code points are part of graphemes like the zero width non joiner Glyph A glyph is a visual representation or image of a character It is the actual shape or form of a character as it appears on a screen or in print A single character can have multiple glyphs associated with it representing different typographic variations or font styles You can check for more details UTF JavaScript uses UTF and not UTF as opposed as many other languages To note UTF would also have all of those issues In UTF characters are encoded in bit chunks code unit For instance is encoded in hexadecimal into thus its notation U or u and € is encoded as AC Problem Using a bit code unit can only result in possible characters so how do we represent the other characters UTF has a system where it can use code units to encode some code points For instance 𐐷 is the code point U will be encoded as D DC a high surrogate D and a low surrogate DC String prototype lengthAccording MDN the length is based on code units The length data property of a String value contains the length of the string in UTF code units This explains why for U FC or 𐐷 U using length doesn t return as those are encoded in code units 𐐷 length U length U FC One possible fix for this case is to use iterators According to MDN again iterators work on code points they say characters but they mean code points Since length counts code units instead of characters if you want to get the number of characters you can first split the string with its iterator which iterates by charactersAnd it does work indeed… 𐐷 length U length U FC é length …but not for all characters Why Unicode compositionAnother specificity of Unicode is that it can combines multiple code points to form a grapheme This is called canonical equivalence see Canon Compat Equivalence For instance the letter Ç can either be the code point for this character or the code point for C followed by the diacritic mark ̧ We can also use normalization NFD and NFC to switch between the precomposed and decomposed forms see Norm Forms Many characters are known as canonical composites or precomposed characters In the D forms they are decomposed in the C forms they are usually precomposed This explains why é s length was either or in the initial example decomposed form → code points precomposed form → code pointIn JavaScript you can use String prototype normalize MDN é length é normalize NFD length é normalize NFD normalize NFC length Emoji SequenceSimilarly to character compositions emojis can be combined together with special characters this is not an exhaustive list Skin tone modifiers can be used to customize the color skin of emojisFor instance is composed of Medium Dark Skin Tone modifier   Zero Width Joiner ZWJ can be used to merge some emojis togetherFor instance ‍ is composed of ‍ ZWJ And ‍‍‍ is composed of each individual family members plus ZWJs ‍‍‍   ‍ ‍ ‍ Variation Selectors can be used to choose a different glyph variant for a code pointFor instance ️ is composed of ️ Variation Selector to force the display as an emoji Intl SegmenterIn the TC committee added to ECMAScript Intl Segmenter The Intl Segmenter object enables locale sensitive text segmentation enabling you to get meaningful items graphemes words or sentences from a string Once a locale is picked you can use segment to generate an iterator with each grapheme of a string const seg new Intl Segmenter en granularity grapheme for const grapheme of seg segment Hélô‍‍‍ console log grapheme segment H é l ô ‍‍‍ And if you want to get the number of grapheme like length you can transform it to an array first seg segment length seg segment é length Browser compatibilitySadly at the date of the writing July is not supported on Firefox to this date  check on caniuse com You can track this issue if you want to follow its development 2023-07-25 13:04:00
Apple AppleInsider - Frontpage News MagSafe may be expanding beyond Mac and iPhone to the iPad https://appleinsider.com/articles/23/07/25/magsafe-may-be-expanding-beyond-mac-and-iphone-to-the-ipad?utm_medium=rss MagSafe may be expanding beyond Mac and iPhone to the iPadMagSafe may not just be for iPhone and Mac Apple has researched how to make a folio case that protects an iPad or other device which also integrates wireless charging Mockup of a future iPad with MagSafe Source AppleInsider Imagine an AirPods wireless charging case that was big enough to hold an iPad That s what is at the heart of the newly granted patent Wireless Charging System With Simultaneous Wireless Power Transfer At Different Frequencies Read more 2023-07-25 13:35:43
Apple AppleInsider - Frontpage News Paramount+ with Showtime $11.99 price bump starts to hit viewers https://appleinsider.com/articles/23/07/25/paramount-with-showtime-1199-price-bump-starts-to-hit-viewers?utm_medium=rss Paramount with Showtime price bump starts to hit viewersSubscribers of Paramount who were on the old Showtime and CBS All Access bundle are being warned of a price rise with the monthly cost increasing to as subscriptions renew Paramount and Showtime merged on June into a single service called Paramount With Showtime with subscribers carried over to the service kept under the existing pricing structure at first Now those users are having to pay a bit more Previously customers who were under the original Showtime and CBS All Access package before the latter became Paramount were charged per month via the iOS app In App Payment system Read more 2023-07-25 13:13:38
海外ニュース Japan Times latest articles Hong Kong tightens customs checks on Japanese vegetables https://www.japantimes.co.jp/news/2023/07/25/national/hong-kong-tightens-customs-checks-japanese-vegetables/ Hong Kong tightens customs checks on Japanese vegetablesThe move comes as Beijing has stressed safety concerns over Tokyo s plan to release into the treated radioactive wastewater from the Fukushima plant into the 2023-07-25 22:25:03
海外ニュース Japan Times latest articles Chinese Foreign Minister Qin Gang removed from office after one-month absence https://www.japantimes.co.jp/news/2023/07/25/asia-pacific/politics-diplomacy-asia-pacific/china-foreign-minister-qin-gang-removed/ Chinese Foreign Minister Qin Gang removed from office after one month absenceThe report did not give a reason for Qin s removal but said President Xi Jinping signed a presidential order to enact the decision Top diplomat 2023-07-25 22:20:27
海外ニュース Japan Times latest articles Naoya Inoue knocks out Stephen Fulton to win super bantam belts https://www.japantimes.co.jp/sports/2023/07/25/more-sports/boxing-2/inoue-fulton-report/ Naoya Inoue knocks out Stephen Fulton to win super bantam belts The Monster is now the second Japanese man to win world titles in four weight divisions after Kazuto Ioka achieved the feat in June 2023-07-25 22:20:19
ニュース BBC News - Home Qin Gang: China removes foreign minister after unexplained absence https://www.bbc.co.uk/news/world-asia-china-66299379?at_medium=RSS&at_campaign=KARANGA furious 2023-07-25 13:06:22
ニュース BBC News - Home Leicester: Man and five-year-old boy found dead in house https://www.bbc.co.uk/news/uk-england-leicestershire-66304503?at_medium=RSS&at_campaign=KARANGA leicester 2023-07-25 13:36:41
ニュース BBC News - Home Kylian Mbappe transfer news: Will Frenchman move to Saudi Arabia or Real Madrid? https://www.bbc.co.uk/sport/football/66298561?at_medium=RSS&at_campaign=KARANGA kylian 2023-07-25 13:20:12
ニュース BBC News - Home World Aquatics Championships 2023: GB's Matt Richards and Tom Dean win 200m freestyle gold and silver https://www.bbc.co.uk/sport/swimming/66302622?at_medium=RSS&at_campaign=KARANGA World Aquatics Championships GB x s Matt Richards and Tom Dean win m freestyle gold and silverMatt Richards and Tom Dean win m freestyle gold and silver to secure Great Britain s first swimming medals of the World Aquatics Championships in Japan 2023-07-25 13:43:00
ニュース BBC News - Home Hundreds of holidaymakers arrive in UK on rescue flights https://www.bbc.co.uk/news/uk-66297476?at_medium=RSS&at_campaign=KARANGA areas 2023-07-25 13:25:10
ニュース Newsweek 夏だ!ビールだ!海外ビールがお買い得...おすすめ商品を一挙紹介 https://www.newsweekjapan.jp/stories/lifestyle/2023/07/post-102267.php 夏だビールだ海外ビールがお買い得おすすめ商品を一挙紹介人気商品が日替わりで登場するアマゾン「タイムセール」。 2023-07-25 22:30: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件)