投稿時間:2022-07-07 02:34:26 RSSフィード2022-07-07 02:00 分まとめ(33件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita 【Python】AmazonAPIを使って自分が欲しい商品の値下げをLINEに通知 https://qiita.com/Sekai0625/items/368e4ddef770c297ce7e importtimeurlamaz 2022-07-07 01:39:18
python Pythonタグが付けられた新着投稿 - Qiita 【Django】詳細ページをfunction-based viewで作成する。 https://qiita.com/k_uki512/items/bf686c9db0ebc0e43bc2 django 2022-07-07 01:27:23
python Pythonタグが付けられた新着投稿 - Qiita 完全無料ホスティングでDiscordBotを作った話。 https://qiita.com/LabPixel/items/0995f51074a535201a60 discord 2022-07-07 01:13:05
AWS AWSタグが付けられた新着投稿 - Qiita 【Qiitaでも使える】テキストから図が生成できるMermaidでAWS構成図をつくる https://qiita.com/b-mente/items/b17275090176d63d1d69 github 2022-07-07 01:04:30
Docker dockerタグが付けられた新着投稿 - Qiita ROSの公式インストール手順をcudaglベースのDockerファイルで再現したら案外苦戦した https://qiita.com/nube266/items/51c73a0bec15e279ea1e cudagl 2022-07-07 01:19:55
Ruby Railsタグが付けられた新着投稿 - Qiita [宇宙一わかりやすい] n + 1 問題とはなにが問題なのか https://qiita.com/1129-tame/items/5c8db29e4718b9f38959 開発 2022-07-07 02:00:11
海外TECH Ars Technica Meta highlights NFT, blockchain hopes as it shutters its Novi crypto wallet https://arstechnica.com/?p=1864462 dreams 2022-07-06 16:31:32
海外TECH MakeUseOf 10 Myths and Facts About Remote Work https://www.makeuseof.com/myths-facts-about-remote-work/ common 2022-07-06 16:45:14
海外TECH MakeUseOf How the Rootd App Can Help You Manage Anxiety and Panic Attacks https://www.makeuseof.com/rootd-app-help-manage-anxiety-panic-attacks/ How the Rootd App Can Help You Manage Anxiety and Panic AttacksPanic attacks can come on suddenly so it s helpful to have a resource right in your pocket Rootd aims to be that quick support to help you through 2022-07-06 16:30:13
海外TECH MakeUseOf How to Enable Simplified Quick Settings in Windows 11 https://www.makeuseof.com/windows-11-simple-quick-settings/ quick 2022-07-06 16:15:14
海外TECH DEV Community How to get started with AWS https://dev.to/roy8/how-to-get-started-with-aws-4gb2 How to get started with AWS What is Amazon web services Amazon Web Services AWS is a secure cloud services platform that offers compute power database storage content delivery and other functionality to help businesses scale and grow It provides these services through a global network of data centers that are located in major cities around the world This means that businesses can run their applications on Amazon s proven infrastructure without having to worry about buying or managing their own physical servers AWS payments model is a pay as you use service that charges you for the resources you use This means that you only pay for what you use and there are no upfront costs or long term contracts You can also easily scale your resources up or down as your needs change If you re looking for a comprehensive easy to use cloud computing platform that can help your business scale and grow then AWS is the right choice for you AWS Free TierThe AWS free tier provides customers with a free trial period After the free trial customers can continue to use the free tier for a limited time After the free trial period customers will need to pay for any services they use The AWS free tier includes services such as Amazon EC Amazon S and Amazon DynamoDB How to create an AWS AccountNavigate to the Amazon Web Services homepage Click the Create an AWS Account button Enter your email address and choose a password Enter your personal information Enter your credit card information Choose your support plan Click the Create Account and Continue button Once your account has been created you can begin using AWS services To get started simply log in to the AWS Management Console with your new account credentials From here you can explore the various AWS products and services that are available First steps in AWSTaking your first steps with AWS can be daunting There are a lot of services to choose from and it can be difficult to know where to start Here is a brief overview of some of the most popular AWS services and how they can be used to build scalable and reliable applications EC is a web service that provides resizable compute capacity in the cloud It is designed to make web scale cloud computing easier for developers S is a storage service that offers industry leading scalability data availability security and performance DynamoDB is a fast and flexible NoSQL database service for all applications that need consistent single digit millisecond latency at any scale Lambda is a serverless computing platform that allows you to run code without provisioning or managing servers Lambda takes care of all the infrastructure for you so you can focus on building your application RDS is a cloud based relational database service that makes it easy to set up operate and scale a relational database in the cloudRoute is a cloud based DNS service that provides a reliable and cost effective way to route end users to Internet applications IAM is a service that helps you securely control access to AWS resources You use IAM to control who is authenticated and authorized to use resources But before you get too excited there are a few things you should keep in mind First of all Amazon Web Services is a bit of a complex beast so it s important to take some time to familiarize yourself with how it works before diving in headfirst Additionally you ll need to make sure you have a good understanding of your own needs and requirements before getting started as AWS can be a bit overwhelming at first Once you ve got all that sorted out though there s no reason not to give AWS a try It s an incredibly powerful tool that can really take your business to the next level So what are you waiting for Get started today Star our Github repo and join the discussion in our Discord channel Test your API for free now at BLST 2022-07-06 16:47:45
海外TECH DEV Community How to use LINQ GroupBy method? https://dev.to/canro91/how-to-use-linq-groupby-method-37k6 How to use LINQ GroupBy method I originally published this post on my blog a couple of weeks ago It s part of a post series about LINQ Let s take a deeper look at one of the most common LINQ methods Let s learn how to group the elements of a collection using GroupBy The GroupBy method groups the elements of a collection based on a grouping key This method returns a collection of groups or buckets organized by that key The GroupBy method receives as a parameter a delegate with the property to use as a key when grouping elements For example let s group our catalog of movies by rating var movies new List lt Movie gt new Movie Titanic f new Movie The Fifth Element f new Movie Terminator f new Movie Avatar new Movie Platoon new Movie My Neighbor Totoro Group our catalog of movies based on their ratingvar groupedByRating movies GroupBy movie gt movie Rating foreach var group in groupedByRating Each group or bucket has a Key property Console WriteLine Rating group Key foreach var movie in group Console WriteLine movie Name Console WriteLine Output Rating Titanic Rating The Fifth Element Rating Terminator Rating Avatar My Neighbor Totoro Rating Platoonrecord Movie string Name int ReleaseYear float Rating Notice we used Top level statements records and implicit usings statements All boilerplate code is gone Also to group our catalog of movies we used movie gt movie Rating as the parameter for the GroupBy method books GroupBy book gt book Category Photo by Cristina Gottardi on Unsplash How to transform every group Apart from grouping collections by a key the GroupBy method has another overload to transform each group or bucket of items Let s change the previous example to count the movies with the same rating var movies new List lt Movie gt new Movie Titanic f new Movie The Fifth Element f new Movie Terminator f new Movie Avatar new Movie Platoon new Movie My Neighbor Totoro Transform every group into a RatingCount typevar countByRating movies GroupBy movie gt movie Rating rating movies gt new RatingCount rating movies Count foreach var group in countByRating Console WriteLine group Rating group Count Output record Movie string Name int ReleaseYear float Rating record RatingCount float Rating int Count This time we passed a second parameter to the GroupBy method The first parameter was still the grouping key as usual But the second one was a delegate that received the grouping key and the elements of each group We named the two parameters rating and movies With the ratings and the movies per rating we transformed every group of movies into a new object RatingCount Since we wanted to count the movies with the same rating we used another LINQ method Count How to group by more than one property In the two previous examples we used the Rating property as the grouping key But we can group the elements of a collection by more than one grouping property With the GroupBy method to group a collection by more than one property use a custom object as the grouping key For example to group our catalog of movies by release year and reating we can write a LINQ query like this var groupByReleasedYearAndRating movies GroupBy movie gt new movie ReleaseYear movie Rating Then the Key property would be an object instead of a primitive value It means we can access both the ReleaseYear and the Rating of each group For example var groupByReleasedYearAndRating movies GroupBy movie gt new movie ReleaseYear movie Rating foreach var group in groupByReleasedYearAndRating var groupingKey group Key var releaseYear groupingKey ReleaseYear var rating groupingKey Rating Do something with the releaseYear and rating foreach var movie in group Do something with each movie in the group Voilà That s the GroupBy method It creates groups or buckets with the elements of a collection and transforms each group If you noticed the output of our previous examples the GroupBy method grouped the elements without sorting them For that we would need the OrderBy method To learn about LINQ and other methods check my quick guide to LINQ on my blog All you need to know to start working with LINQ in minutes or less Hey I m Cesar a software engineer and lifelong learner If you want to support my work check my Getting Started with LINQ course on Educative where I cover these and other LINQ methods in depth Happy coding 2022-07-06 16:23:15
海外TECH DEV Community Adding tests to your Discord Bot - Discord Bot Series (Part 3) https://dev.to/kevinschildhorn/adding-tests-to-your-discord-bot-discord-bot-series-part-3-513 Adding tests to your Discord Bot Discord Bot Series Part Discord is a great platform for keeping in touch with friends and adding a bot can enrich that experience A bot can respond to messages perform an action based on a command or even add music to a voice chat In this series we ll be going over how to create a small example bot by using the NPM module for DiscordJS in a KotlinJS project Note This is the third post in a series of three posts about how to use KotlinJS and NPM modules to create a full fledged project in this case a Discord Bot PreviouslyIn my last post we went over how to add DiscordJS to our project and start creating our bot We added a listener for messages and replied to hello with a response of the computer name I mentioned at the end that we weren t catching some edge cases with our response and so in this post we ll be adding tests to our discord bot As a refresher in this series we re going to create a small discord bot that responds to a specific message with its computer name Creating tests in kotlinThis article assumes you understand some basics about adding tests in a kotlin project specifically using the kotlin test library You can see a helpful guide from jetbrains Adding testing dependenciesFirst off we need to add dependencies to testing libraries Make sure you have these dependencies in your build gradle file dependencies testImplementation kotlin test testImplementation kotlin test js Testing our logicIn the last post we added logic to respond to hello messages from users in the channel We now want to test and make sure our bot says hello only when it gets a correct message We want to have them ignore capitalization and not respond to other bots I mean they can if they want this is just for the example Feel free to add any other requirements you want Separating out codeAs it is now we cannot test our code as it s just sitting inside the messageCreate callback First we should move our code to a separate file Let s make a new class called HelloHandler class HelloHandler fun handleMessage message Message if message content hello message channel send Now that we ve moved our code to the handler we can update the existing code like so val helloHandler HelloHandler client on messageCreate message gt helloHandler handleMessage message Now we can call this code from a test Let s make a quick test for testing a successful response class HelloGreetingTest Test fun testHelloWorldSuccess val message Message val helloHandler HelloHandler helloHandler handleMessage message assertTrue TODO Assert the message was sent Hopefully this seems straight forward though you may notice that we aren t asserting anything at the moment This is because we don t have a way to track that a message has been sent and we don t really want that in our HelloHandler For now it s commented out but we will update this in a later section Custom MessagesAnother thing you may notice is there s no way to set the content of the Message this is because the Message class is defined externally which means that the bot is expecting the definition from the external Js Even if we didn t want a custom message you cannot use external classes in testing because there are variables that are expected but undefinedSo how do we get around this InterfacesThe easiest way I ve found to test external classes is to create a common interface Then we can have two classes implementing this interface the external class we already have and a mocking class Let s create an interface for Message external interface MessageInterface val author UserInterface val channel ChannelInterface val content String Here we are defining the values we want to test and we are setting it as external to match the existing Message class Note You don t need to define values you don t need or else your interface would be massive for no good reason Now we ll have external class Message MessageInterface override val author User override val channel TextChannel override val content String data class MockMessage override val author MockUser override val channel MockChannel override val content String MessageInterfaceI ve gone ahead and created a MockUser and a MockChannel as we want to check the username for a bot name and check if the message was sent These were created the same as the MockMessage by creating an interface and implementing it Note that all other Mock classes should be referencing the Interfaces you ve created not the external classes Don t forget to update the HelloHandler to use the interface So now we can test a custom message great How do we make sure our bot sent a greeting as a response Checking ResponsesIn order to test a response to an incoming message we can create a MockChannel to track when messages are sent We don t want to actually send a message just keep track of its status I ve created a MockChannel that has a simple Boolean that tells whether a message was sent class MockChannel ChannelInterface var sentMessage Boolean false private set override fun send content Any Promise lt MessageInterface gt print Sent Message sentMessage true return Promise gt So now we can assert that the sentMessage variable is true or false depending on our test You can go a step further and keep a reference to the information for other tests but for simplicity we ll stick to this Now we can finally go back to the test function and update it with our new code Final Test Test fun testHelloWorldSuccess val user MockUser Kevin val channel MockChannel val message MockMessage user channel Hello val helloHandler HelloHandler helloHandler handleMessage message assertTrue message channel sentMessage Here we have a working test We create the mock information create the Handler then handle the message Then we assert that the bot sent a message back Now let s run the test by either clicking the arrow next to the test and selecting run or calling gradlew test from the command line It failed Why did it fail Let s check the HelloHandler if message content hello message channel send It looks like we didn t take capitalization into account Lets quickly change the check to message equals hello ignoreCase true and run again It passed Excellent our bot is working as we d expect We can go ahead and add more tests to make sure that other messages don t trigger a response and catch other edge cases Maybe we want to include exclamation points or other languages or we want to ignore hellos from users named Kevin The possibilities are endless ConclusionCongrats You ve tested your Discord Bot You now have the basics to test all different messages and how your bot responds to them Your bot should now be running stable and ready to join some channels This is the last post of the series at this point you should have everything you need to know to be able to run a simple Discord Bot in KotlinJs There are many other references out there to expand your bot from here using KMP libraries Hopefully this series has been helpful and given you an introduction into kotlinJs Thanks for reading Let me know in the comments if you have questions Also you can reach out to me at kevinschildhorn on Twitter 2022-07-06 16:00:53
Apple AppleInsider - Frontpage News Apple debuts new high-security Lockdown mode, $10M cybersecurity grant https://appleinsider.com/articles/22/07/06/apple-debuts-new-high-security-lockdown-mode-10m-cybersecurity-grant?utm_medium=rss Apple debuts new high security Lockdown mode M cybersecurity grantApple is debuting a new security feature called Lockdown Mode for iOS and macOS Ventura that s meant to shore up defenses for high risk users and is also contributing million to groups that research and prevent cyberattacks Apple Lockdown ModeThe iPhone maker on Wednesday announced the two endeavors as part of its commitment to protect users from highly targeted mercenary spyware such as those made by NSO Group Read more 2022-07-06 16:56:10
Apple AppleInsider - Frontpage News M2 MacBook Air preorders begin on Friday, July 8 https://appleinsider.com/articles/22/07/06/m2-macbook-air-preorders-begin-on-friday-june-8?utm_medium=rss M MacBook Air preorders begin on Friday July Apple has announced that the M MacBook Air will become available for preorder on July with shipments arriving as soon as July When Apple unveiled the next generation MacBook Air it didn t give an exact release date beyond July On Wednesday however the company officially announced that preorders will start on Friday The MacBook Air will then start shipping out to consumers the following Friday July The new M MacBook Air starts at for the base model With maximum specifications it tops out at Read more 2022-07-06 16:08:48
海外TECH Engadget Is the Honor Magic4 Pro a cinematographer’s dream? https://www.engadget.com/honor-magic4-pro-camera-test-log-filming-160055384.html?src=rss Is the Honor Magic Pro a cinematographer s dream After it spun out from Huawei Honor wanted to make a splash with its first flagship the Magic Pro One of the biggest features the company boasted about was the camera saying it was good enough to shoot a proper movie with Armed with one we d all be turned into miniature Tom Cruises shooting TikToks as if they were destined for the multiplex Unfortunately the phone never left its native China but Honor is using the same pitch for its successor the Magic Pro which has arrived in Europe Certainly Honor distinguished itself with the spec list which reads like the company threw the kitchen sink then the kitchen then the dining room at the handset The Pro model has a megapixel primary camera paired with a second megapixel ultra wide camera with a degree field of view On top of that there s a megapixel telephoto with x digital zoom and an x Direct Time of Flight sensor giving it whip fast focusing The “IMAX enhanced phone s cinematic credentials go further Honor enlisted the help of a professional colorist to devise specific hue palettes for video Bryan McMahan created a series of Look Up Tables LUTs for the phone which act like an Instagram filter for your video These range from a Sunny mode that makes your footage look like it was shot at the height of summer and a Gloomy mode which makes everything look like it s been through a bleach pass One of my favorites was Focus which dials down all the colors except for skin tone at least for my caucasian limbs making everything look like an s music video But the phone s real point of interest is its claimed ability to shoot in Log which is the standard that most Hollywood movies are shot in Now technically it s a custom format MagicLog which Honor designed to work with mobile devices but the point remains the same Log is short for Logarithmic and it s a way of filming something that preserves as much of the dynamic range and tone as possible It ll preserve scenes in high contrast as well as shadows highlights and whites that a conventional digital camera might try to smooth out or just straight up fail to capture properly Unfortunately it has not been plain sailing by any stretch of the imagination some of the takes I shot for my piece to camera were plagued by strobing Which was odd since my LED bulbs shouldn t be strobing and the camera only seems to pick up on it every now and again The sound too leaves a lot to be desired and I had to record all of my audio on an external microphone Yes this is common for most professional cameras but the point here is that people are going to be using this as the camera for their vacation videos right Being able to shoot Log means you could also hand over your footage to a colorist and get perfect footage In theory The first test shots I took were very flat and it was hard to pull out a lot of the detail and dynamic range that should be there Now I m not a professional colorist but my colleague Engadget s Steve Dent is so I sent him the phone and all of my footage for him to run his trained eye all over He said that there was a significant amount of clipping which means that there s a lot of detail in the footage that can t be accessed This is likely a consequence of compression since MagicLog is designed to be mobile friendly after all But it means that my clips couldn t after treatment get the good pops of color that we were hoping to tease out Not to mention that Honor doesn t appear to offer a standalone LUT for editing software which meant that Steve couldn t simply run it through the standard model which is table stakes for other pro cameras Shooting with the Magic Pro is also in Steve s words difficult for a couple of other fairly big reasons First because it clips highlights you have to expose for them and not the shadows which means that there s some guesswork involved Then there s no easy way to tell if you re shooting safe footage as there s no built in Display LUT to give you an idea of what s coming There s also no video level display so shooting in MagicLog involves a lot of hitting and hoping Now that s not to say that the Magic Pro is terrible awful and a general waste of your money because it isn t Shooting in the standard mode is easy enough and the results were good enough for me to use as a pro quality video for Engadget But fundamentally it feels like until Honor really finishes building out the Log offering with a display LUT video level display and making it easier for non pros to color correct afterward this isn t something novices should be playing with and expecting good results 2022-07-06 16:00:55
海外科学 NYT > Science F.D.A. Lets Juul Appeal Ban and Stay on the Market During a Review https://www.nytimes.com/2022/07/06/health/juul-fda-ecigarettes.html reviewthe 2022-07-06 16:56:30
海外科学 NYT > Science Mass Funeral Deepens Mystery: Why Did 21 South African Teens Die in Tavern? https://www.nytimes.com/2022/07/06/world/africa/south-africa-tavern-teen-deaths.html Mass Funeral Deepens Mystery Why Did South African Teens Die in Tavern Survivors of the tragedy last month recounted in interviews the presence of a mysterious gas and then a crush to escape Officials say the stampede didn t kill them 2022-07-06 16:19:37
海外TECH WIRED 14 Early Amazon Prime Day Deals on Google Hardware https://www.wired.com/story/google-nest-devices-prime-day-deals-2022/ amazon 2022-07-06 16:44:00
金融 金融庁ホームページ 金融庁職員の新型コロナウイルス感染について公表しました。 https://www.fsa.go.jp/news/r4/sonota/20220706.html 新型コロナウイルス 2022-07-06 17:45:00
金融 金融庁ホームページ 非常勤職員(専門研究員)を募集しています。 https://www.fsa.go.jp/common/recruit/r4/kenkyu-03/kenkyu-03.html 非常勤職員 2022-07-06 17:30:00
金融 金融庁ホームページ スチュワードシップ・コードの受入れを表明した機関投資家のリストを更新しました。 https://www.fsa.go.jp/singi/stewardship/list/20171225.html 機関投資家 2022-07-06 17:00:00
金融 金融庁ホームページ 金融庁・金融情報システムセンター(FISC)の意見交換会について公表しました。 https://www.fsa.go.jp/news/r4/sonota/20220706/20220706.html 意見交換 2022-07-06 17:00:00
ニュース BBC News - Home Boris Johnson vows to keep going amid pressure from ministers https://www.bbc.co.uk/news/uk-politics-62065534?at_medium=RSS&at_campaign=KARANGA boris 2022-07-06 16:29:34
ニュース BBC News - Home British Airways to cancel 10,300 more flights https://www.bbc.co.uk/news/business-62070451?at_medium=RSS&at_campaign=KARANGA october 2022-07-06 16:26:20
ニュース BBC News - Home China: MI5 and FBI heads warn of ‘immense’ threat https://www.bbc.co.uk/news/world-asia-china-62064506?at_medium=RSS&at_campaign=KARANGA china 2022-07-06 16:02:25
ニュース BBC News - Home No diplomatic immunity in modern slavery cases, Supreme Court rules https://www.bbc.co.uk/news/uk-62062318?at_medium=RSS&at_campaign=KARANGA filipina 2022-07-06 16:41:53
ニュース BBC News - Home Who has gone, who is staying? https://www.bbc.co.uk/news/uk-politics-62058278?at_medium=RSS&at_campaign=KARANGA ministerial 2022-07-06 16:47:15
ニュース BBC News - Home Chelsea: Raheem Sterling agrees move from Manchester City https://www.bbc.co.uk/sport/football/61942360?at_medium=RSS&at_campaign=KARANGA chelsea 2022-07-06 16:50:39
ニュース BBC News - Home Wimbledon: Nick Kyrgios beats Cristian Garin to reach semi-finals https://www.bbc.co.uk/sport/tennis/62065861?at_medium=RSS&at_campaign=KARANGA wimbledon 2022-07-06 16:49:40
Azure Azure の更新情報 Public preview: Migration tools for Azure Monitor Agent https://azure.microsoft.com/ja-jp/updates/public-preview-migration-tools-for-azure-monitor-agent/ tools 2022-07-06 16:01:04
Azure Azure の更新情報 General availability: Azure Database for PostgreSQL—Hyperscale (Citus) supports PostgreSQL minor versions https://azure.microsoft.com/ja-jp/updates/general-availability-azure-database-for-postgresql-hyperscale-citus-supports-postgresql-minor-versions-3/ General availability Azure Database for PostgreSQLーHyperscale Citus supports PostgreSQL minor versionsBenefit from the latest PostgreSQL minor versions for Azure Database for PostgreSQL Hyperscale Citus 2022-07-06 16:00:58
Azure Azure の更新情報 Generally available: Azure Functions retry policy for Event Hubs and timer triggers https://azure.microsoft.com/ja-jp/updates/generally-available-azure-functions-retry-policy-for-event-hubs-and-timer-triggers/ triggers 2022-07-06 16:00:51

コメント

このブログの人気の投稿

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