投稿時間:2023-01-04 23:23:58 RSSフィード2023-01-04 23:00 分まとめ(24件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita C++を使った1次元オイラー方程式のシミュレーション https://qiita.com/shohirose/items/ba9d63781682b0ab544f https 2023-01-04 22:30:45
python Pythonタグが付けられた新着投稿 - Qiita Polarsでデータサイエンス100本ノックを解く(前編) https://qiita.com/_jinta/items/28442d25bba067c13bb7 polars 2023-01-04 22:06:15
Ruby Railsタグが付けられた新着投稿 - Qiita Railsのcolumn名の変更 https://qiita.com/osho210/items/9598f4b626afbdbfabd4 railsgmodelusernams 2023-01-04 22:12:24
海外TECH MakeUseOf The Best Backpacks for Tech Students https://www.makeuseof.com/tag/best-backpacks-techie-students/ chargers 2023-01-04 13:00:56
海外TECH DEV Community Learn how to set up Tailwind CSS with TypeScript and Flowbite https://dev.to/themesberg/learn-how-to-set-up-tailwind-css-with-typescript-and-flowbite-f51 Learn how to set up Tailwind CSS with TypeScript and FlowbiteTypeScript is a free and open source programming language that helps improve the scalability maintainability and readability of code It does this by adding optional static typing to JavaScript It is developed and maintained by Microsoft and used by companies such as Slack Bitpanda Accenture Medium and many more to help them scale code better This guide will teach you how to set up Tailwind CSS and the Flowbite library with TypeScript and also show you how you can use the components from Flowbite to power your Tailwind CSS application with integrated types and interfaces Create a new projectFollow the next steps to learn how to install TypeScript and Tailwind CSS in a local project Before continuning make sure that you have Node js installed locally on your computer Create a new project and run the following command to create a package json file in the root folder npm initThis is where we will add the project dependencies and the script commands Install TypeScriptBy following the official TypeScript guide we will install and set it up in our project using NPM Run the following command to install and require TypeScript as a dependency in your package json file npm install save dev typescriptCreate a new tsconfig json file by running the following command npx tsc initReplace the content of the tsconfig json file using the following code compilerOptions lib dom es outDir lib cjs sourceMap true declaration true noImplicitAny true module commonjs target es allowJs true moduleResolution node include src ts exclude node modules dist lib Here s a breakdown of what each option key value pair represents lib this option specifies which libraries we want TypeScript to supportoutDir this options tells the TS compiler where to export the compiled codesourceMap enables source maps to be generateddeclaration generates declaration files after compiling if truenoImplicitAny prevents using the any type by throwing an error this is best practice module specifies the module system to use when generating JS code from the TypeScript source codetarget specifies the JavaScript version to which the TypeScript code should be transpiledallowJs specifies whether the compiler should include JS files in the projectmoduleResolution specifies the strategy that the compiler should use to resolve module namesinclude specifies which are the source files TypeScript should compile exclude specifies which folders should TypeScript ignore when compilingAfter setting up the TypeScript configuration file we can now write some code Set up the folder structure for your TypeScript files by creating a new src folder and creating an index ts file inside of it with the following code const text string Hello TypeScript console log text This code already uses a type declaration which will help us verify if the compiler works properly Webpack bundlerIn order to compile the TypeScript code into JavaScript that is supported by modern browsers we will have to install Webpack and bundle the source code into one final JavaScript file that we will later include in our HTML templates Install Webpack and the necessary plugins by executing the following command in your terminal npm i D webpack webpack cli typescript ts loaderCreate a new webpack config js file and add the following content webpack config jsconst path require path module exports mode development devtool inline source map entry main src index ts output path path resolve dirname dist filename app bundle js lt Will be compiled to this single file resolve extensions ts tsx js module rules test tsx loader ts loader Run the following command to watch for changes and compile the TypeScript source code into browser compatible JavaScript code npx webpack watchThis will generate an app bundle js named JavaScript file that you can now include inside your HTML templates To check out if it works you can now open the index html file inside your browsers CommonJSBy default the compiled code will be CJS as specified in the tsconfig json file Compile the code by running the following command in your terminal npx tscThis will generate a new lib folder with CJS CommonJS compiled JavaScript code that we will later include in our templates ECMAScript modulesIf you want to compile for ESM instead of CJS you can use the following command instead npx tsc m es outDir lib esmNow that we have succesfully configured TypeScript and also compiled the source code we have to install and configure Tailwind CSS Run the following command to install and require Tailwind CSS in your package json file npm install D tailwindcss Install Tailwind CSSCreate a new tailwind config js file by running the following command npx tailwindcss initBased on your source template files make sure you include all of the relevant paths in the content area of your Tailwind CSS configuration file type import tailwindcss Config module exports content src ts html theme extend plugins In our case we will look for all TypeScript files inside the src folder and all of the HTML files inside the project relative to the root Create a new input css file inside the src folder and import all of the basic Tailwind CSS directives tailwind base tailwind components tailwind utilities Compile the code when changes are made by using the following command npx tailwindcss i src input css o dist output css watchCreate a new index html file inside the root folder of your project with the following basic setup where we include all of the compiled code lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset UTF gt lt meta http equiv X UA Compatible content IE edge gt lt meta name viewport content width device width initial scale gt lt title gt Document lt title gt lt link rel stylesheet href dist output css gt lt head gt lt body gt lt h class text xl gt Hello Tailwind CSS lt h gt lt script src lib cjs index js gt lt script gt lt body gt lt html gt Now open the index html file in your browser and you should see the text larger because of the text xl utility class and also see a Hello TypeScript message inside your developer console Install FlowbiteYou can start using the open source and interactive components from Flowbite which are based on Tailwind CSS and support TypeScript types by following the next steps Install and require Flowbite in your package json file by running the following command npm install flowbiteRequire Flowbite as a plugin inside your tailwind config js file module exports plugins require flowbite plugin Make sure that the generated utility classes from the library are also included in the final output css file by adding the source code paths inside your tailwind config js file module exports content node modules flowbite js Flowbite componentsNow that you have set up TypeScript Tailwind CSS and Flowbite you can start using this stack to build scalable websites using a large collection of UI components from Flowbite which support type declarations One example would be to use the Modal component and using its methods and options to programatically show or hide the element First of all we need to make sure that we have the correct HTML element set up in our templates we can use this markup and add it inside the index html file lt button id button type button class text white bg blue hover bg blue focus ring focus ring blue font medium rounded lg text sm px py mr mb dark bg blue dark hover bg blue focus outline none dark focus ring blue gt Default lt button gt lt div id modal tabindex aria hidden true class fixed top left right z hidden w full p overflow x hidden overflow y auto md inset h modal md h full gt lt div class relative w full h full max w xl md h auto gt lt Modal content gt lt div class relative bg white rounded lg shadow dark bg gray gt lt Modal header gt lt div class flex items start justify between p border b rounded t dark border gray gt lt h class text xl font semibold text gray lg text xl dark text white gt Terms of Service lt h gt lt button type button class text gray bg transparent hover bg gray hover text gray rounded lg text sm p ml auto inline flex items center dark hover bg gray dark hover text white gt lt svg class w h fill currentColor viewBox xmlns gt lt path fill rule evenodd d M a L l a L l a L l a L a z clip rule evenodd gt lt path gt lt svg gt lt button gt lt div gt lt Modal body gt lt div class p space y gt lt p class text base leading relaxed text gray dark text gray gt With less than a month to go before the European Union enacts new consumer privacy laws for its citizens companies around the world are updating their terms of service agreements to comply lt p gt lt p class text base leading relaxed text gray dark text gray gt The European Union s General Data Protection Regulation G D P R goes into effect on May and is meant to ensure a common set of data rights in the European Union It requires organizations to notify users as soon as possible of high risk data breaches that could personally affect them lt p gt lt div gt lt Modal footer gt lt div class flex items center p space x border t border gray rounded b dark border gray gt lt button type button class text white bg blue hover bg blue focus ring focus outline none focus ring blue font medium rounded lg text sm px py text center dark bg blue dark hover bg blue dark focus ring blue gt I accept lt button gt lt button type button class text gray bg white hover bg gray focus ring focus outline none focus ring blue rounded lg border border gray text sm font medium px py hover text gray focus z dark bg gray dark text gray dark border gray dark hover text white dark hover bg gray gt Decline lt button gt lt div gt lt div gt lt div gt lt div gt As you can see we added a unique ID for the button element that the parent modal element to be able to set event listeners to them later on After having this markup put in place we need to open the index ts file and import the Modal class from the Flowbite package and set up the event listeners import Modal from flowbite select the two elements that we ll work withconst buttonElement HTMLElement document querySelector button const modalElement HTMLElement document querySelector modal create a new modal componentconst modal ModalInterface new Modal modalElement toggle the visibility of the modal when clicking on the button buttonElement addEventListener click gt modal toggle Alternatively you can also call on the available methods of the Modal class such as show or hide to add the logic inside your TypeScript files instead add your own logic and then show the modalmodal show This example will show the modal without having to click the button since the logic has been added in TypeScript directly Using TypesFlowbite supports type declarations for the interactive UI components including object interfaces and parameter types Check out the following examples to learn how you can use types with Flowbite Additionally to our code above we will now import some relevant types from the Flowbite package namely the ModalOptions and ModalInterface import Modal from flowbite import type ModalOptions ModalInterface from flowbite other codeGenerally speaking all of the components have an interface definition that you can use whenever you create a new object to make sure that you re using the correct types for parameters and methods When creating a new modal you can set the ModalInterface as the main type const modal ModalInterface new Modal modalElement modalOptions Flowbite also supports type definitions for the options object so if you want to set the placement of the modal based on types here s how you would do that const modalOptions ModalOptions placement top right const modal ModalInterface new Modal modalElement modalOptions Why are these types useful though Because if you don t set the correct value for the placement key for example you set right instead of top right or bottom right TypeScript will throw an error saying that it is not a correct option Here s the full code using the types from Flowbite for the modal defintion import Modal from flowbite import type ModalOptions ModalInterface from flowbite const buttonElement HTMLElement document querySelector button const modalElement HTMLElement document querySelector modal const modalOptions ModalOptions placement top right const modal ModalInterface new Modal modalElement modalOptions buttonElement addEventListener click gt modal toggle modal show Using the types from TypeScript with the Flowbite components will ensure a more scalable and bug free code down the line TypeScript Starter ProjectWe have built a Tailwind CSS TypeScript Starter project on GitHub that uses the configuration above with some pre built scripts and examples that can help you to get started faster 2023-01-04 13:43:18
Apple AppleInsider - Frontpage News Cooler Master's new gear is aimed at content creators & enthusiasts https://appleinsider.com/articles/23/01/04/cooler-masters-new-gear-is-aimed-at-content-creators-enthusiasts?utm_medium=rss Cooler Master x s new gear is aimed at content creators amp enthusiastsAt the Consumer Electronics Show Cooler Master debuted the Stream Lux light panel Stream Lucid microphone Stream Origins video capture peripheral and more Cooler Master targets content creators collectors and enthusiasts with a brand new collection of gear including a microphone mechanical keyboard panel light and more Read more 2023-01-04 14:00:13
海外TECH Engadget Microsoft is reportedly integrating ChatGPT's technology into Bing https://www.engadget.com/microsoft-reportedly-integrating-chatgpt-technology-into-bing-131502579.html?src=rss Microsoft is reportedly integrating ChatGPT x s technology into BingMicrosoft s Bing search engine might soon become more attuned to users needs and return results in a more human like fashion According to The Information the tech giant is planning to incorporate the OpenAI software powering ChatGPT into Bing in hopes that it can help the company catch up to or maybe even outshine Google Microsoft invested billion in OpenAI back in and more recent reports said it s in talks with the Elon Musk founded startup for a follow up investment Now The Information is reporting that Microsoft s initial investment included an agreement to incorporate some aspects of GPT into Bing OpenAI developed GPT as a language model that uses deep learning to generate human like text responses Late last year it launched a program called ChatGPT that quickly skyrocketed in popularity due to its ability to return responses that seem like they were written by actual people Educators raised concerns that it could easily be used for cheating since those who tried the tool said they would ve given its responses a good grade if a student claimed to have written them ChatGPT is free for now but OpenAI intends to charge for its use in the future nbsp What GPT integration would mean for Bing isn t clear at this point It doesn t have the capability to scrape the internet for results so Microsoft will still use its own search engine technology However The Information said it could help Bing present results to users in a friendlier way A source familiar with Bing s systems told the publication that Microsoft could use the technology to present search results as full sentence answers with the source for the information If Bing suggests related queries to the original one GPT could explain their relevance in a meaningful manner The technology could help Bing suggest better keywords or key phrases to users as well Microsoft could launch GPT integration as soon as this March The Information says so we might hear a confirmation of this report ーalong with more details if it is indeed true ーin the near future nbsp 2023-01-04 13:15:02
海外TECH Engadget Citizen's new smartwatch uses AI to determine your level of alertness https://www.engadget.com/citizens-new-cz-smart-watch-uses-ai-to-determine-your-level-of-alertness-130530865.html?src=rss Citizen x s new smartwatch uses AI to determine your level of alertnessCitizen has announced its latest CZ Smart smartwatches that feature a built in AI quot self care advisor quot the company said The new proprietary YouQ app was built with IBM Watson Studio and uses NASA technology to show the wearer when they re at their most alert or fatigued in order to quot maximize their daily potential quot the company said nbsp The intriguing idea is that the CZ Smart s YouQ app uses IBM Watson s neural networks to learn a user s quot chronotype quot preferred timing of sleep and wake over a seven to ten day period by processing sleep data and quot alert scores quot The latter are generated from a custom designed alert monitor test a consumer version of NASA s PVT test created at the Ames Research Center Fatigue Countermeasures Laboratory The tests are quot brief gamified and can be taken daily to measure the wearer s alertness quot according to Citizen nbsp CitizenUsing that data the YouQ app can learn your unique rhythms and habits From there it creates a dynamic recognition model to recommend quot Power Fixes quot or actions and activities to help the wearer reduce the effects of fatigue improve alertness and promote better habits Over time it can increase personalization and presumably the effectiveness of the Power Fixes for each person nbsp The new technology is only available on the new second generation CZ Smart watches the first generation launched in and the company also has a CZ Smart Hybrid lineup Those come in mm sport and mm casual models with mesh bracelets links and silicone straps Technology wise they offer inch AMOLED displays Snapdragon Wear processors with GB of storage and feature hours of battery life with quot faster charging quot nbsp CitizenSensor wise you get a gyroscope altimeter barometer accelerometer heart rate sensor and SP ambient light sensor It comes pre loaded with the YouQ wellness app Strava Spoitfy YouTube Music and Amazon Alexa It presumably has its own OS and works with iPhone or Android devices nbsp The previous model used Wear OS and was built in partnership with Fossil but Citizen didn t specify the OS for the current model They ll go on sale in March in the US with pricing to arrive at a later date The current CZ Smart cost at launch nbsp 2023-01-04 13:05:30
海外TECH Engadget JBL created 'eco-friendly' versions of its portable speakers https://www.engadget.com/jbl-go-3-eco-clip-4-eco-pulse-5-ces-2023-130041621.html?src=rss JBL created x eco friendly x versions of its portable speakersJBL has new speakers at CES including environmentally friendly versions of its Go and Clip portable models The company is also updating its Pulse speaker line known for its groovy light and color show with better audio than its predecessor As their names suggest the JBL Go Eco and JBL Clip Eco are environmentally conscious variants of the Go and Clip Launching on Earth Day April nd the Eco speakers use percent PCR Post Consumer Recycled plastic for mechanical construction and percent recycled fabric for their speaker grilles They also ship in environmentally safe packaging using FSC certified paper and soy ink Apart from their environmental focus they re identical to their non eco namesakes from late The Go line has a rounded rectangle design offering five hours of playback Meanwhile the Clip has an integrated carabiner for easy hanging and hours of playing time Both models include IP water and dust resistance which is handy for trips to the beach or pool The environmentally friendly speakers will cost the same as their non eco counterparts for the Go Eco and for the Clip Eco JBLJBL s Pulse lineup has a built in LED that acts like a digital lava lamp synced to your music The new Pulse initially announced for a release but delayed to this year should have richer audio than its predecessor thanks to a bigger passive radiator for deeper bass and a refined woofer for richer mid low frequencies JBL says the degree speaker is IP rated and can last hours before plugging in its USB C cable The Pulse launches this spring for 2023-01-04 13:00:41
海外TECH Engadget Schneider Electric’s Home Energy System ties a battery to your smart home https://www.engadget.com/schneider-electric-ces-2023-energy-management-system-130035281.html?src=rss Schneider Electric s Home Energy System ties a battery to your smart homeOne of the more unfortunate consequences of our energy companies failing to invest in smarter and greener technology when it had the chance is that now we have to do it all ourselves And it s certainly not the most fun in the world trying to tie together a grid inside your own home with so many competing companies in the space Schneider Electric is pledging to offer a one company fixes all solution with its Home Energy Management System which it s announcing at CES Schneider s system is more or less all of the components necessary to manage your home s energy needs That includes a home battery solar inverter electrical panel connected power outlets smart switches and its own EV charger The idea being that you can buy all of the bits at once and then manage all of your home s power needs from a single app That should says the company help reduce the cost complexity and space requirements of buying these components separately If there s a benefit to such a system it s that Schneider s hardware will co ordinate the sources of energy in your home to suit your needs That s especially important during a power outage where for instance you can set the system to only power the essentials to preserve energy So you can set it to run your fridge freezer water heater and HVAC but nothing else when things get rough You ll also be able to set it to calculate when energy costs are at their lowest for instance in order to charge an EV from grid power There s no word on price yet but we can expect the components to make themselves available across the year 2023-01-04 13:00:35
海外TECH CodeProject Latest Articles Autogenerate DB Unit Tests - User Guide https://www.codeproject.com/Articles/5351226/Autogenerate-DB-Unit-Tests-User-Guide autogenerate 2023-01-04 13:52:00
海外TECH CodeProject Latest Articles Context, conventions, structure, evolution -- accessory_java https://www.codeproject.com/Articles/5351092/Context-conventions-structure-evolution-accessory Context conventions structure evolution accessory javaContext structure conventions and evolution of accessory java a library providing a programmer friendly way to facilitate and systematise multiple tasks 2023-01-04 13:46:00
ニュース BBC News - Home Mortgage approvals sink to lowest level in two years https://www.bbc.co.uk/news/business-64154980?at_medium=RSS&at_campaign=KARANGA england 2023-01-04 13:07:09
ニュース BBC News - Home David Gold: West Ham co-chairman dies following short illness https://www.bbc.co.uk/sport/football/64163755?at_medium=RSS&at_campaign=KARANGA illness 2023-01-04 13:52:28
北海道 北海道新聞 「子供と生きる権利奪った」子育て経験ある障害者ら憤り 江差の不妊処置 https://www.hokkaido-np.co.jp/article/783588/ 障害者 2023-01-04 22:38:11
北海道 北海道新聞 安全操業交渉「めど立っていない」 外務省ロシア課長 羅臼漁協で説明 https://www.hokkaido-np.co.jp/article/783538/ 課長 2023-01-04 22:38:07
北海道 北海道新聞 衆院解散は「可能性の問題」 首相、発言トーンダウンか https://www.hokkaido-np.co.jp/article/783592/ 岸田文雄 2023-01-04 22:19:10
北海道 北海道新聞 日ハム宮西「ルーキーのように」 37歳、プロ16年目へ覚悟 https://www.hokkaido-np.co.jp/article/783572/ 兵庫県尼崎市 2023-01-04 22:19:10
北海道 北海道新聞 千葉Jと横浜BC準決勝へ バスケ男子全日本選手権 https://www.hokkaido-np.co.jp/article/783587/ 全日本選手権 2023-01-04 22:19:10
北海道 北海道新聞 ポイントに雪、列車254本運休 JR北海道、5日も一部運休 https://www.hokkaido-np.co.jp/article/783552/ 運休 2023-01-04 22:23:56
北海道 北海道新聞 初戦突破のとわの森、縦横無尽の攻撃で逆転勝ち 全日本高校バレー https://www.hokkaido-np.co.jp/article/783595/ 初戦突破 2023-01-04 22:22:10
北海道 北海道新聞 飛躍と課題解決誓う 石狩管内7市町で仕事始め https://www.hokkaido-np.co.jp/article/783591/ 仕事始め 2023-01-04 22:15:13
北海道 北海道新聞 宇野、坂本らが初滑り披露 フィギュアのアイスショー https://www.hokkaido-np.co.jp/article/783581/ 世界選手権 2023-01-04 22:04:10
仮想通貨 BITPRESS(ビットプレス) 日本暗号資産取引業協会(JVCEA)、2023年 年頭所感 https://bitpress.jp/count2/3_17_13516 資産 2023-01-04 22:46:36

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)