投稿時間:2021-07-16 02:30:45 RSSフィード2021-07-16 02:00 分まとめ(32件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Amazon、Kindleストアで対象のライトノベルが半額になる「MF文庫J夏フェス2021 第2弾」のセールを開催中 https://taisy0.com/2021/07/16/143103.html amazon 2021-07-15 16:44:01
IT 気になる、記になる… Amazon、Kindleストアで細田守監督の関連作品を最大50%オフで販売するセールを開催中 https://taisy0.com/2021/07/16/143099.html amazon 2021-07-15 16:38:17
AWS AWS Security Blog How AWS is helping EU customers navigate the new normal for data protection https://aws.amazon.com/blogs/security/how-aws-is-helping-eu-customers-navigate-the-new-normal-for-data-protection/ How AWS is helping EU customers navigate the new normal for data protectionAchieving compliance with the European Union s data protection regulations is critical for hundreds of thousands of Amazon Web Services AWS customers Many of them are subject to the EU s General Data Protection Regulation GDPR which ensures individuals fundamental right to privacy and the protection of personal data In February we announced strengthened commitments to protect … 2021-07-15 16:09:33
AWS AWS Security Blog How AWS is helping EU customers navigate the new normal for data protection https://aws.amazon.com/blogs/security/how-aws-is-helping-eu-customers-navigate-the-new-normal-for-data-protection/ How AWS is helping EU customers navigate the new normal for data protectionAchieving compliance with the European Union s data protection regulations is critical for hundreds of thousands of Amazon Web Services AWS customers Many of them are subject to the EU s General Data Protection Regulation GDPR which ensures individuals fundamental right to privacy and the protection of personal data In February we announced strengthened commitments to protect … 2021-07-15 16:09:33
js JavaScriptタグが付けられた新着投稿 - Qiita useStateを使うときのあの構文の意味 https://qiita.com/abababe/items/e0c8e4cedcd9bf919595 これが意味するところは、fruitとsetFruitという名前のつの変数を作って、useStateから返される値のうちつ目をfruitに、つ目をsetFruitに代入する、ということです。 2021-07-16 01:52:16
js JavaScriptタグが付けられた新着投稿 - Qiita JavaScript 関数 https://qiita.com/Yuto-8867/items/1bf6d2ec7923eb0516af JavaScript関数関数関数はfunction関数名を使って表します。 2021-07-16 01:25:10
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) リストを数値に変換するときのエラーについて https://teratail.com/questions/349713?rss=all リストを数値に変換するときのエラーについてlistnbspnbspwinnbspnbspinputwinsnbspnbspwinsplitlistappendwinsnumnbspnbspprintlistintnumnbspfornbspnumnbspinnbsplistprintnumこのコードを実行すると、TypeErrornbspintnbspargumentnbspmustnbspbenbspanbspstringnbspanbspbyteslikenbspobjectnbspornbspanbspnumbernbspnotnbspaposlistaposというエラーが出ます。 2021-07-16 01:46:20
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 配列を使用しているのにForループより処理速度が遅い理由 https://teratail.com/questions/349712?rss=all 配列を使用しているのにForループより処理速度が遅い理由以前より皆様の投稿を拝見しており、勉強させていただいております。 2021-07-16 01:18:28
Docker dockerタグが付けられた新着投稿 - Qiita 【備忘録】Dockerコンテナ内のMySQLが文字化けしたので修正した https://qiita.com/Asaiii12/items/69e4420d06d91374428a 【備忘録】Dockerコンテナ内のMySQLが文字化けしたので修正した概要dockerでLaravelMySQLの環境を立ち上げ、Seederでダミーデータを入れたところ、MySQL内の日本語が文字化けしてしまった。 2021-07-16 01:06:23
海外TECH Ars Technica OnePlus cancels the base-model OnePlus 9 Pro, will only sell a $1,069 version https://arstechnica.com/?p=1780537 increase 2021-07-15 16:20:01
海外TECH DEV Community CSS Grid Cheat Sheet 🔥 https://dev.to/simonpaix/css-grid-cheat-sheet-2ll8 CSS Grid Cheat Sheet Hi dev friends I made this CSS Grid Cheat Sheet that fits on one page I hope this will help you learn the grid layout Please let me know what you think of it If you want to see more resources like this one and coding tips you can follow me on Twitter 2021-07-15 16:39:06
海外TECH DEV Community EPNS Push Notifications Arrive at DeFi on Oasis.app https://dev.to/shittu_olumide_/epns-push-notifications-arrive-at-defi-on-oasis-app-11im EPNS Push Notifications Arrive at DeFi on Oasis appDai is considered among the most reliable stablecoins because the widely circulated coin is both pegged to the US dollar and backed by MakerDAO approved crypto collateral Dai can be created by opening Vaults overcollateralized debt positions through Oasis app which aims to be the most trusted decentralized application to interact with the Maker Protocol and to manage vaults EPNS is pleased to deepen its exploration of push notification use cases using Dai by launching a pilot program to provide decentralized push notifications for monitoring Maker Vaults on Oasis app Maker Vault owners can now enjoy a trading edge by receiving notifications when a price of an asset goes above or below a certain threshold changing the collateralization ratio and then being aware when the Vault risks being liquidated Maximize DeFi Opportunities With Oasis app and Maker Vaults Powered by Push NotificationsWith a market cap surpassing billion the usage of the Dai stablecoin is growing particularly in DeFi applications where it is being combined in a multitude of ways with DeFi products to reduce price volatility Oasis app is the most trusted way to access the Maker Protocol so anyone can borrow and use Dai anywhere through its simple user interface Oasis app makes it easy to borrow Dai by opening a Maker Vault a deposit account for MakerDAO s Dai After connecting a wallet to Oasis users can open a Vault deposit collateral and generate Dai against it Borrowers can choose from more than crypto collateral sources e g ETH WBTC USDT with more added weekly and all with their own risk parameters and minimum collateralisation ratios Oasis connects to more than half a dozen wallets making it easy to collateralize Dai and borrow with no fixed repayment schedules Managing DeFi services however involves a lot of checking of different sources and messages from multiple platforms yet no central messaging service exists One essential element is missing decentralized push notifications In order to worry less about what might happen Oasis app users are highly dependent on a notification service that would help them to manage their Maker Vaults including When the Vault might be at risk of liquidation on the next price update due to a sudden price dropWhen the Vault has reached a certain collateralization ratio that you d like to take a certain action at either to buy additional collateral or repay When risk parameters such as Stability Fee s or Debt Ceiling changes are made by Maker Governance that affect a Vault you own Though Oasis app simplifies access to the Maker Protocol the lack of a decentralized push notification service until now means important notifications are distributed to multiple places such as email or a Twitter or Telegram account A push notification service sending all notifications to the Oasis app wallet would allow all platform users to receive and take timely action on important DeFi notifications while still protecting data privacy as Oasis app users interact with internal and external data sources Receiving notifications directly within Oasis app will allow our customers to live a safer and conscious experience without always worrying about checking different sources It has always been one of the most asked for features and that is why this partnership is crucial to us Chris Bradbury CEO of Oasis app The EPNS SolutionThe EPNS decentralized push notification service sends timely notifications through a single source of communication the investor s wallet All Maker Vault notifications will go directly to the user s Oasis app wallet where they can track vault positions and take immediate action EPNS is the first native on chain notification solution to stream all crucial time sensitive information to a user s wallet The partnership benefits to Oasis app users include EPNS will send all data notifications directly to Oasis app user wallets The EPNS and Oasis app teams will adapt the highly customizable EPNS protocol to meet the various push notification needs of Dai users in DeFi markets EPNS channels and users can customize their notification settings for different notification requirements How EPNS Will Support Oasis appUnder this pilot program EPNS is building a dedicated channel for Oasis app see our lightpaper for definitions of channels services and more Oasis app users can subscribe to the Oasis app channel to receive customized notifications to their wallets Through collaboration with the Oasis app team we will gain insight into the push notification needs of Maker Vault and Dai stablecoin users and what they want from the EPNS protocol Decentralized notifications will provide real time Maker Vault data to Oasis app Vault owners so all users can act in a timely manner and benefit from real time information on all their open Vaults Meanwhile all users can continue to operate within the private secure ecosystem of Oasis app across all DeFi services without having to deal with integration pains across many different protocols Maker Vault is a powerful tool leveraging the stablecoin Dai to make borrowing saving and trading more efficient Push notifications to the Oasis app will ensure users can act in a timely manner and optimize their vault and DeFi positions commented Harsh Rajat Founder and Project Lead of Ethereum Push Notification Service Looking forward we foresee many new EPNS notification channels being introduced for Oasis app in particular and DeFi stablecoin uses in general The use of collateral to reduce volatility and other risks is making decentralized finance accessible to more people Push notifications will be essential to enable future Oasis app users to take advantage of the best collateralization and liquidation rates Thus we view decentralized push notifications as an important service that will accelerate the mass adoption of DeFi Since Oasis app is at the forefront of creating a unified stablecoin powered DeFi hub we expect our partnership to yield many new useful notification services and features for the decentralized finance market The long term goal of the pilot program is to develop a notification system for future versions of Oasis app DeFi users ーwho can easily integrate the EPNS protocol into their wallet ーwill expect push notifications to be an integral service Going forward we also plan to work closely with Oasis app users to create new messaging solutions to meet their evolving push notification needs We are pleased to be partnering with Oasis app and anticipate EPNS push notifications becoming an indispensable tool in stablecoin DeFi markets About Oasis appOasis app is the home for everything you want to accomplish with Dai A decentralized application that runs on the Ethereum blockchain Oasis aims to be the most trusted app to access the Maker protocol get Dai and in general to deploy your capital into DeFi Dai is a better smarter digital currency for everyone It is the world s first unbiased currency and its value consistently tracks the US Dollar which means it doesn t suffer from the volatility associated with many other digital currencies 2021-07-15 16:31:14
海外TECH DEV Community Using roadmap.sh for structured self-learning https://dev.to/khenhey/using-roadmap-sh-for-structured-self-learning-29pd Using roadmap sh for structured self learningCover image by Jaromír Kavan on UnsplashThe tech industry evolves quickly and as a beginner this can make you feel like you are always behind One of the things I really had to learn is that the basics are always the right priority to dive into It does not matter what career goal you have be it frontend backend or anything in between or beyond Understanding HTML CSS and one of the many amazing programming language out there will be a good start to your career Which language to choose That depends on your own personal context If you already landed a job and are expected to learn a specific language for it choose that one If you feel excited for another go for the other one When self learning the key thing is motivation Work with what makes you excited Once you learn one language the others can easily follow Don t feel rushed or pressured into something that does not spark joy I started my journey through the RailsGirls community So it felt right for me to follow some Ruby courses because I already knew people who could help me a little and it was the only language I had already seen When I got hired as a frontend developer I picked up learning JavaScript It was fun to see how some stuff was the same and where the two languages differed Again once you know one language others can easily follow You don t know what you do not knowOne of the reasons it is so hard when you are a beginner in tech is because you probably don t know the gaps in your knowledge Having a mentor or knowing people who have more experience to help point into the right direction can be of huge help here Luckily I was surrounded by an amazing group of people to point me into the right direction Still I was craving some more structure to help me set priorities when it came to learning the essentials Roadmap shThrough some luck I found Kamran Ahmed s roadmap sh I checked out the frontend roadmap and was amazed at the way it helped me gain insight into things I did not know I could dive into This is how I implemented it into my own learning I created a markdown file and wrote down the list of things I wanted to learn using the roadmap I went through the list and marked the ones that motivated me to learn and the ones I knew could help me build the projects I was working on I gave those extra priority I went through the list again and for each topic I started searching the web for good resources that I could study to learn that subject matter I did not study them immediately I was just collecting and linking to those resources in the file Note nowadays roadmap sh has some nice resources themselves for some subjects make sure to check them out Every quarter I chose some subjects and studied the resources When a subject was done I had the satisfaction of checking the checkbox in front of it Projects will kickstart your careerLast but not least I noticed that through work and building personal projects I was already able to check off some of the boxes on my list Working on actual projects actually helps you learn so much quicker than doing courses reading articles books or watching videos If you haven t tried building something yourself yet go for it Find something that you think would be fun to build Maybe try using a fun API that is available on the web Like NASA Spotify or the Star Wars API It might feel daunting to start but if you split up the project in small tasks it will become much easier Good luck for all of you out there starting on your journeys Don t forget that the only person you should compare yourself with is yourself And every new thing you learn is one more thing you did not know before Be nice to yourself and others and build fun stuff Originally posted on my own website 2021-07-15 16:13:46
海外TECH DEV Community Microservices Authentication Strategies: Theory to Practice https://dev.to/aspecto/microservices-authentication-strategies-theory-to-practice-86i Microservices Authentication Strategies Theory to PracticeIn this article we will walk through common ways of implementing authentication microservices We will have parts The theoretical part talking about OpenID Connect OAuth JWT etc Here I try to save you time wandering through the web and giving you all the basics you need to understand in order to start coding The practical part where we will implement two Node js microservices one responsible for user authentication via google login another responsible for greeting the user that has a token created by the previous service Plus we add a react JS app to interact with those services The Theory What is authentication Authentication is the answer users give us when we ask them “Who are you For us to believe users they need to go through a process providing some proof For example by providing a username amp password or by using a social login provider What is authorization Authorization is usually relevant when we already know who the user is thus the user is authenticated unless we allow anonymous access but we won t get into that use case here Our users want to perform certain actions in our system and the process of checking if they are allowed to do it or not is called authorization Note The reason we re talking about this authorization in an authentication article is that these terms are often confused and we need to understand it to understand concepts like OAuth amp OpenID Connect A good real world analogy for both of the above would be while checking in a hotel room Authentication is your passport and authorization is if I m allowed to enter a certain room because I booked it OAuth OAuth is an authorization protocol To understand it best let s remember the days when it did not exist In the image below you can see a Facebook screen asking for our Gmail password to search for our contacts on Facebook and add them as friends Facebook from the days before OAuth source Think of what this means Facebook developers would have access to your Gmail password and essentially all your Gmail data including emails OAuth enables an app like Gmail to grant access solely to specific resources from that app in this case your contacts It does so by creating an access token that can talk to an API and retrieve this data OAuth provides us with tokens a refresh toke and an access token The access token is short lived and enables you to access the restricted API The refresh token s role is to enable us to obtain new access tokens without requiring the user to log in each time our access token expires which results in a better user experience OpenID Connect OIDC OpenID is an authentication protocol built on top of OAuth and its main addition is the ID token The ID token is intended for use with client side applications whereas the access token provided by OAuth is meant to be used with the resource server the API OAuth token audiences source JWTJWT Json Web Token is a standard method for representing claims securely between two parties The information in the token is digitally signed to avoid tampering While OAuth doesn t enforce token type a lot of implementations use JWT tokens to store the refresh amp access tokens OpenID Connect on the other hand defines that the token must be in theJWT format NodeJS Microservices Authentication StrategiesNow that we have a basic understanding of the relevant terms and before we dive into practice we can start exploring possibilities to implement authentication in our microservices The obvious way use a database to store user data write your logic for creating users registration store passwords etc You can then create a form in your client side where the user logs in and once logged in you can store user information wherever you see fit cookies app state etc OpenID Connect you can use services like Google amp Facebook that would enable your users to log in using their corresponding accounts Then you create a corresponding user in your database Here you don t need to implement any user creation UI or store passwords When your user logs in you can store the JWT token in a cookie and your microservice could know who the user is according to that token It could also allow or forbid certain actions based on that but that s out of the scope of this post You could of course combine this with option one having some of the users created via identity providers like Google Facebook and others in your own system Use an identity as a service tool like Auth Okta which essentially helps with both use cases above and can save you time implementing everything on your own I won t dive into this one but you can check their websites for more info For the practical part of this guide I have selected option because I feel it gives the most benefit in understanding authentication in Node js and you will most likely use it anyway whether directly or under the hood The PracticeLet s begin implementing our service with OpenID connect enabled Here s what we re going to create account service a rest API that handles user creation We will be using passport with passport google oauth strategy which is based on OpenID Connect greeting service a simple rest api that greets the user A React app that lets the user login with google by consuming account service and greets the user consuming the greeting service Step Setting up Google project for login Go to and register if you haven t done so yet Create a new projectGoogle OAuth project creation Select the newly created project and click on Create Credentials Select OAuth Client ID Select Configure Consent Screen Select Internal amp Hit Create Fill in the name and emails you can leave the rest blank for now we will get to it later In the scopes screen click add scopes and then select userinfo email img alt Updating selected Google scopes lt br gt src dev to uploads s amazonaws com uploads articles teexfusjxbjhpi png Updating selected Google scopes Hit Continue Now we have our consent screen Let s go back to credentials amp hit create credentials and choose OAuth Client ID Choose your name and for authorized redirect URI add “http localhost auth google callback and hit create You should now receive a pop up with client id amp client secret Keep them we will be using them soon Step Creating account serviceNote throughout this tutorial for the sake of simplicity we re using the default code generated with express generator So no good looking typescript like things to see here Create the project with express generator amp perform the installs needednpx express generator no view account servicecd account servicenpm installnpm install save jsonwebtoken passport passport google oauth cors Express generator created some default routes We won t be using the users one but use the index js So I m deleting references to it The initial project looks like this In bin www let s change the port from to var port normalizePort process env PORT Add passportPassport is authentication middleware for Nodejs It s very simple to use and supports all the options we need so I chose to use it Passport uses strategies to handle certain types of login passport google login is a strategy for logging in with Google and is based on OpenID Connect In our app js file let s add the following code so that it looks like this const express require express const path require path const cookieParser require cookie parser const logger require morgan const cors require cors const passport require passport const GoogleStrategy require passport google oauth OAuthStrategy const indexRouter require routes index const app express This is here for our client side to be able to talk to our server side you may want to be less permissive in production and define specific domains app use cors app use logger dev app use express json app use express urlencoded extended false app use cookieParser app use express static path join dirname public app use passport initialize app use passport session app use indexRouter passport serializeUser function user cb cb null user passport deserializeUser function obj cb cb null obj passport use new GoogleStrategy clientID your google client id clientSecret your google client secret callbackURL http localhost auth google callback function accessToken refreshToken profile done here you can create a user in the database if you want to return done null profile module exports app Notice we have a few interesting things here One we added cors for the client side localhost to be able to make requests from our server side Having security in mind you probably want to only allow specific domains in production Serialize amp deserialize user these are functions responsible for serializing amp deserializing the user to and from the session GoogleStrategy this is how we tell Passport we would be using google authentication Remember the client id amp secret you saved earlier Now is a good time to insert them Adding authentication routesNow let s go to the routes index js file and add the relevant routes const express require express const router express Router const passport require passport const jwt require jsonwebtoken router get function req res next res render index title Express const TOKEN SECRET SECRET router get auth google passport authenticate google scope profile email router get auth google callback passport authenticate google failureRedirect error function req res const token jwt sign id req user sub name req user name TOKEN SECRET expiresIn res cookie auth token httpOnly true res redirect http localhost module exports router TOKEN SECRET we will be using this to sign our JWT token auth google the actual google login route Users are redirected to Google Once they are done they are redirected back to our server at auth google callback There we can create our JWT token Once created we add it on the request as an httpOnly cookie so that it is not accessible to javascript code which is good in terms of security You ll soon see how this works on the client end When ready we redirect back to the client side Side note we store the name inside the JWT for demonstration purposes but you probably don t need it and may not be a best practice in terms of security Now that we re done with our account service let s go on to the client side Step Create a client side react applicationnpx create react app auth strategies clientcd auth strategies client yarn add axiosWe now have a default react app Let s modify the app js file to contain a link to google authentication import logo from logo svg import App css function App return lt div className App gt lt header className App header gt lt img src logo className App logo alt logo gt lt a href http localhost auth google gt Sign in with Google lt a gt lt header gt lt div gt export default App And after running it with yarn start it looks like this Click on “sign in with Google After doing so you should be redirected to Google for authentication Make sure you run npm start on accounts service for it to run in port Let s take a look at what happened after our call to the accounts service auth google callback accounts service made a POST request to google which returned an access token amp id token Zoom in to the responseZoom in to the services P S These images are generated using Aspecto s live flow viewer If you d like to visualize your services the way I did you should try Aspecto for free It takes minutes to start sending traffic It used that token to make another GET request to google to get the user s personal info Zoom in to the response Our microservice has redirected us back to the client side with set cookie in the response for our auth cookie creation Therefore after that you will be redirected back to the exact same screen with one difference If you open your browser s DevTools you should see an auth cookie that is http only Now we re ready to make use of this token That leads us to our greeting service Keep the client side handy as we will modify it soon Step Setting up the greetings service Let s create our servicenpx express generator no view greetings servicecd greetings servicenpm installnpm install save passport passport jwt cors Remove user js file and routes in app js this is our fresh start const express require express const path require path const cookieParser require cookie parser const logger require morgan const indexRouter require routes index const app express app use logger dev app use express json app use express urlencoded extended false app use cookieParser app use express static path join dirname public app use indexRouter module exports app Modify port to in bin wwwvar port normalizePort process env PORT Set up passport to read our JWT token by modifying app js const express require express const path require path const cookieParser require cookie parser const logger require morgan const cors require cors const indexRouter require routes index const app express app use cors credentials true origin http localhost app use logger dev app use express json app use express urlencoded extended false app use cookieParser app use express static path join dirname public const passport require passport const JwtStrategy require passport jwt Strategy ExtractJwt require passport jwt ExtractJwt app use passport initialize app use passport session app use indexRouter const cookieExtractor function req let token null if req amp amp req cookies token req cookies auth return token const TOKEN SECRET SECRET const opts jwtFromRequest ExtractJwt fromExtractors cookieExtractor secretOrKey TOKEN SECRET passport use jwt new JwtStrategy opts jwt payload done gt try console log jwt payload jwt payload done null jwt payload catch err done err module exports app Here we need to pay attention to a few interesting things cookieExtractor is responsible for reading the token from the httpOnly cookie we created earlier and will be passed along with the request more on that later Notice we must use the same TOKEN SECRET we used to create the token in order to read it or we will get an invalid signature error when reading The extractor is then passed to the JwtStrategy which is responsible for providing us with the jwt payload We could be fetching more info about the user from the database if we were to add a database but for the sake of simplicity I decided not to Now we ll add our greeting route in index js const express require express const router express Router const passport require passport router get function req res next res render index title Express router get greetme req res next gt passport authenticate jwt session false err user info gt if err console log error is err res status send An error has occurred we cannot greet you at the moment else res send success true fullName user name givenName user name familyName req res next module exports router What happens here is that Passport extracts the info from the JWT for us and all we do is return it to the client Start the greetings service in port npm start Step Modify the client side to send the httpOnly cookieSince we want the client JWT token to not be accessible to any malicious javascript code we have stored it in an httpOnly cookie Side note in real life you may want to also make it secure so that it s only accessible via HTTPS So we want to perform our greeting request to the greetings service For that we need to send the contents of the cookie to the server Let s do that then Back in our client side react application we modify App js by adding a button import React useState from react import axios from axios import logo from logo svg import App css function App const name setName useState return lt div className App gt lt header className App header gt lt img src logo className App logo alt logo gt lt a href http localhost auth google gt Sign in with Google lt a gt lt br gt lt button onClick async gt const result await axios get http localhost greetme withCredentials true setName result data fullName gt Greet me please lt button gt name amp amp lt span gt Hi name lt span gt lt header gt lt div gt export default App Now once we get a response with the current user s full name we would see “Hi full name Notice we added a basic axios with withCredentials true that is what makes the cookies pass alongside our request for the server to extract And this emphasizes what happened here behind the scenes A simple GET request that returns a JSON with the user s full name as it came from google and stored in the JWT token Here is what we get after clicking the button That s it We have successfully created the account service for registration amp JWT creation and the greetings service that knows how to read the JWT token and provide data about the user I hope this helped you get a better understanding of authentication in general and specifically while implementing it in nodejs Tom Zach is a Software Engineer at Aspecto Feel free to follow him on Twitter for more great articles like this one Lerna Hello World How to Create a Monorepo for Multiple Node Packages 2021-07-15 16:12:11
海外TECH DEV Community Learning Python-Basic course: Day 16, Fractal lists and other questions https://dev.to/aatmaj/learning-python-basic-course-day-16-fractal-lists-and-other-questions-1ca6 Learning Python Basic course Day Fractal lists and other questions WELCOME Today let us look at a few miscellaneous questions related to multidimensional list which use try exceptIn case you haven t visited yesterday s blog please do so We have covered some really good questions based upon try except Alphabetical order of letters a for i in range try a append ord input Please enter a character except print Error a sorted a The sorted method sorts the list and returns the sorted list This is an inbuilt function to sort the list You can also use insertion sort for i in range len a a i chr a i print a Output Please enter a character aPlease enter a character dPlease enter a character bPlease enter a character h a b d h Note The inbuilt sorted method is so nice that it will directly sort the values in alphabetical order even if we do not convert them into integers Try removing the chr and ord functions and running the code Till now we hadn t handled errors for the input However in this example we handle errors for input values example we can prevent errors f the user inputs more than one character Output Please enter a character Error Please enter a character abcError Please enter a character Error Please enter a character aError Fractal lists We will now try to generate a fractal list Fractal list is a multi multidimensional list looks something like this Got the pattern Basically we must append the list into itself So now let us try doing so a for i in range a append a print a Output Well that didn t work This is because the python syntax doesn t allow us to append to a list like this We must use a temp variable to store the value a for i in range temp a a append temp print a Output Didn t work either This is because when we assign temp a and append temp then we are doing the same thing as before The solution is using the copy method a for i in range temp a copy a append temp print a Output Exercise Write a program to find the length of the list in the fractal list Answer Write a program to reverse the lists in a list ExampleIn Out Hint use try except pass for non list values Answer️So friends that s all for now Hope you all are having fun Please let me know in the comment section below And don t forget to like the post if you did I am open to any suggestions or doubts Just post in the comments below or gmail me Thank you allStar the Learning Python repo made for this course Learning Python Part Series psst follow me on dev to and GitHub for updates 2021-07-15 16:12:09
海外TECH Engadget 'Loki’ shakes up the status quo of the Marvel Cinematic Universe https://www.engadget.com/disney-plus-loki-finale-episode-six-163019038.html?src=rss x Loki shakes up the status quo of the Marvel Cinematic UniverseIn case you didn t hear earlier Lokiwill return for season two and thank goodness the finale didn t resolve a whole lot if it resolved anything Well we did find out who was pulling the strings behind the Time Variance Authority and why but it really served as an introduction to a villain who s scheduled to make his next appearance in Ant Man and the Wasp Quantumania However Loki never felt like an extended prequel to well…anything It s been a show that s stood largely on its own one which forged a unique identity apart from everything else in the Marvel Cinematic Universe including the Thor movies After all this isn t the Loki we spent eight years watching on screen This one was created in in the middle of Avengers Endgame a variant that so far is walking a path free of Asgard and all that pesky Avengers business Chuck Zlotnick Marvel StudiosAnd so Loki the show paved its own road as well not really relying too much on knowledge of the films past the first and last Avengers movies You could walk into the series knowing as much about Loki s fate as the variant Loki and walk away after the first season knowing just as little The finale was interesting because for the first time I have no idea how a Marvel show fits into the greater scheme of things And like He Who Remains I find that a bit exciting One thing that has been true of all the Marvel shows has that we ve always generally known where they re supposed to slot into the bigger universe Agents of SHIELD was originally intended to be a way for the side stories of the Marvel Cinematic Universe to thrive but for a while it was treated as a place to dump movie leftovers Daredevil Luke Cage Jessica Jones and Iron Fist were originally aimed toward setting up The Defenders limited series WandaVision was a prequel for Doctor Strange and the Multiverse of Madness while The Falcon and the Winter Soldier did character work for the next Captain America film Marvel StudiosBut Loki aside from wrapping up a loose thread from Endgame doesn t actually tie into anything especially any upcoming projects They don t even name the man behind the curtain he s just “He Who Remains And he s killed by the end of the episode which means any time we see him from this point forward it s technically a different person another cosmic iteration of the same jerk Fans of the comics know that he s meant to be Kang the Conqueror but that big reveal is yet to come ーbecause the man we met is not a conqueror He was a cosmic bureaucrat The conqueror though hinted at in the Loki finale will make his first full appearance in early He won t remember the events shown in the Disney show since he wasn t actually there which means either the film will completely ignore all we learned here or explain it to the audience anew Prior knowledge of Loki shouldn t and most likely won t be necessary Chuck Zlotnick Marvel StudiosWhich leaves season two of Loki free to do well almost anything it wants The man who seems to now be in charge of the TVA is unlikely to be even close to the same man that Scott Lang and Hope Pym will have to tangle with since we are dealing with a multiverse of possibilities It does throw the next Doctor Strange movie into a bit of uncertainty since in our original non COVID timeline that was supposed to have premiered back in May Were we supposed to see the debut of the multiverse before we saw its origin Or will there be some other cosmic wrench to mess things up further for the MCU A lot of things that seemed inevitable when all these projects were originally announced have now been thrown into uncertainty But for now the key takeaway from the Loki finale is that the series is not beholden to anything else in the Marvel Cinematic Universe It didn t have to load up a ton of character development or make sure everything is back in place plot wise before the next film It s free to take its small cast of characters and fully explore their possibilities with no worries about how it will affect the other Marvel properties What will happen to Loki Sylvie Mobius Ravonna and the rest We can focus on their individual stories instead of fussing over what can and can t happen We can no longer make predictions based on future projects in the pipeline or contractual obligations of actors Theories can proliferate and almost nothing is off limits Every step Loki and the rest take just means another multiverse to explore in shows like What If The Sacred Timeline is dead and so are the shackles of movie continuity 2021-07-15 16:30:19
海外科学 NYT > Science Stephen Colbert Adds a Dash of Comedy to Branson's Space Launch https://www.nytimes.com/2021/07/11/science/stephen-colbert-branson-virgin-galactic-space.html rocket 2021-07-15 16:46:35
金融 ◇◇ 保険デイリーニュース ◇◇(損保担当者必携!) 保険デイリーニュース(07/16) http://www.yanaharu.com/ins/?p=4642 引き下げ 2021-07-15 16:09:33
金融 金融庁ホームページ 金融安定理事会による「新型コロナウイルス感染症の世界的大流行に関する金融安定上の観点からの教訓:中間報告書」について掲載しました。 https://www.fsa.go.jp/inter/fsf/20210715/publish.html 世界的大流行 2021-07-15 17:00:00
ニュース BBC News - Home Covid: More than 500,000 app pings in a single week https://www.bbc.co.uk/news/uk-57854999 wales 2021-07-15 16:30:18
ニュース BBC News - Home Bukayo Saka 'knew instantly of hate' he would receive after England defeat https://www.bbc.co.uk/sport/football/57855251 Bukayo Saka x knew instantly of hate x he would receive after England defeatEngland s Bukayo Saka said he knew instantly the kind of hate he was going to receive after his miss in the penalty shootout in the Euro final 2021-07-15 16:33:02
ニュース BBC News - Home Peter R de Vries: Dutch crime reporter dies after shooting https://www.bbc.co.uk/news/world-europe-57853004 amsterdam 2021-07-15 16:19:53
ニュース BBC News - Home Covid-19: 500,000 app pings in a week and supermarkets to encourage mask-wearing https://www.bbc.co.uk/news/uk-57852683 coronavirus 2021-07-15 16:31:00
ニュース BBC News - Home Instagram admits moderation mistake over racist comments https://www.bbc.co.uk/news/technology-57848106 media 2021-07-15 16:08:36
ニュース BBC News - Home Cheshunt: Police hurt before stolen car driven along railway line https://www.bbc.co.uk/news/uk-england-beds-bucks-herts-57849890 theft 2021-07-15 16:50:23
ニュース BBC News - Home Fury v Wilder III: Rescheduled fight confirmed for 9 October https://www.bbc.co.uk/sport/boxing/57856232 october 2021-07-15 16:42:28
ニュース BBC News - Home Tour de France: Tadej Pogacar holds on to yellow after stage 18 win https://www.bbc.co.uk/sport/cycling/57855533 jersey 2021-07-15 16:38:07
ニュース BBC News - Home British Grand Prix: Lewis Hamilton admits it will be 'tall order' to win 2021 title https://www.bbc.co.uk/sport/formula1/57856947 order 2021-07-15 16:42:40
ニュース BBC News - Home Covid-19 in the UK: How many coronavirus cases are there in my area? https://www.bbc.co.uk/news/uk-51768274 cases 2021-07-15 16:10:59
北海道 北海道新聞 道、まん延防止要請も 札幌 ステージ3目安超え https://www.hokkaido-np.co.jp/article/567652/ 新型コロナウイルス 2021-07-16 01:16:00
北海道 北海道新聞 釧北陽がコールド発進 夏の高校野球北大会 https://www.hokkaido-np.co.jp/article/567581/ 北北海道 2021-07-16 01:09:58
北海道 北海道新聞 職場接種、3000会場が待機 河野氏、大学は9月完了へ https://www.hokkaido-np.co.jp/article/567651/ 河野太郎 2021-07-16 01:05: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件)