投稿時間:2022-10-10 21:17:58 RSSフィード2022-10-10 21:00 分まとめ(22件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS lambdaタグが付けられた新着投稿 - Qiita Amazon ComprehendとLambdaを利用した感情分析APIを作成する https://qiita.com/yoyoyo_pg/items/5fe616bc5c6fd00ac425 amazoncomprehend 2022-10-10 20:54:57
python Pythonタグが付けられた新着投稿 - Qiita IPアドレスにマッチする正規表現について考えてみる https://qiita.com/aikamanami11/items/aef0b7046d3b44efd681 正規表現 2022-10-10 20:21:20
js JavaScriptタグが付けられた新着投稿 - Qiita 仮想DOMの差分検知を実装してみた https://qiita.com/t_109609akg/items/566c8d7a5fc2b70b12fe htmlltarticlegtltcitegt 2022-10-10 20:06:27
AWS AWSタグが付けられた新着投稿 - Qiita Amazon ComprehendとLambdaを利用した感情分析APIを作成する https://qiita.com/yoyoyo_pg/items/5fe616bc5c6fd00ac425 amazoncomprehend 2022-10-10 20:54:57
AWS AWSタグが付けられた新着投稿 - Qiita 【AWS】CloudTrailでS3特定バケットの動作をTrailする https://qiita.com/hiyanger/items/a2cad477fca93edbc251 cloudtrail 2022-10-10 20:38:11
golang Goタグが付けられた新着投稿 - Qiita [Go] 構造体の変換と比較 https://qiita.com/s-h1129/items/35f5753b4a44ec90fb71 順番 2022-10-10 20:41:10
海外TECH DEV Community What are the best platforms to write technical articles? https://dev.to/surajondev/what-are-the-best-platforms-to-write-technical-articles-37fn What are the best platforms to write technical articles IntroductionOne of the most asked questions in my DMs is to where put the technical articles There is various platform for general articles and more specifically only for technical articles Today I am going to list down some of the best platforms to write technical articles The list is in the best to not so best order This is from my perspective This article was sent as an issue of my newsletter Source Code The Newsletter Here I discuss technical writing and social media presence as a developer If this interests you then subscribe to my newsletter from here So let s get started Dev toA constructive and inclusive social network for software developers With you every step of your journey The best platform I have used for writing technical articles From my initial days I am on the platform The best part is that your first article can give you tons of reach when you don t have any followers It doesn t matter the number of followers the content matter on dev to the platform There are lots of improvements on the platform The UI makes that most of the articles are getting discovered HashnodeStart a blog for free instantly and share your ideas with people in tech developers and engineers Hashnode is a free blogging platform The second platform that comes to my mind for writing technical articles is Hashnode They have a pretty good looking UI You can connect your domain or use their sub domain for writing articles The UI and SSL are provided by the Hashnode With your own domain you can have more control over the UI and feel of the blog platform The thing is that it little bit hard to get reach on the platform as a beginner Your article has to be exceptionally great to be featured on the top of the blog and lead to more reach The UI looks good but pinning featured posted at the top hampered the reach of other articles That s what I think of having a low reach for beginner developers In spite of such things You can give it a try for writing articles MediumMedium is an open platform where readers find dynamic thinking and where expert and undiscovered voices can share their writing on any topic Medium is the place for putting general articles You can put your technical articles on it It is very easy to write and publish articles on the platform I have given it a try in my initial days but couldn t continue on it But I have seen some awesome growth on Medium for technical articles So I would recommend you explore the platform TealfeedTealfeed is a knowledge sharing platform that keeps users feed informative connects people of similar interests and empowers creators Tealfeed is a new platform that serves as a general blogging platform I have been in contact with their CEO regarding the future of the tealfeed and its looks awesome I also publish my articles on this platform You can get some good reach through their platform and google source Your Own PlatformThe best platform you can put your blog The best place to put your articles is on your own platform This means that you can put your articles on your own website This will make your article s platform independent You will have more control over most things The trick in publishing articles on your platform is that you put an article on your website and with the canonical URL publish articles on other platforms such as dev to hashnode medium and other blogging platforms Canonical URL will tell the search engine about the main articles and platform articles are marked as duplicates of the main articles This will not hamper your site s SEO You will gain reach on the blogging platform and you will also get views on your own website through search engines So Create a website using WordPress or on your own Start publishing on it and with canonical URL publish on other platforms This is how I publish my articles ConclusionI hope you have understand the platform and methods to use while putting an article online Use your website with other blogging platforms for publishing your article You can subscribe to the newsletter form here for more insight about technical writing and social media presence as a developer Thanks for reading the newsletter 2022-10-10 11:52:14
海外TECH DEV Community Bugs that the Rust compiler catches for you https://dev.to/sylvainkerkour/bugs-that-the-rust-compiler-catches-for-you-268i Bugs that the Rust compiler catches for youOver the decades Humans have proved to be pretty bad at producing bug free software Trying to apply our approximative fuzzy thoughts to perfectly logical computers seems doomed While the practice of code reviews is increasing especially with the culture of Open Source becoming dominant the situation is still far from perfect it costs a lot of time and thus money What if instead we could have a companion always available never tired and the icing on the cake that doesn t cost the salaray of a developer that would help us avoid bugs in our software before they reach production Let s see how a modern compiler and type system helps prevent many bugs and thus helps increase the security for everyone and reduces the costs of software production and maintenance Want to learn more Take a look at my book Black Hat Rust to learn Rust Security and applied Cryptography Resources leaksIt s so easy to forget to close a file or a connection resp err http Get if err nil defer resp Body Close DON T forget this lineOn the other hand Rust enforces RAII Resource Acquisition Is Initialization which makes it close to impossible to leak resources they automatically close when they are dropped let wordlist file File open wordlist txt do something we don t need to close wordlist file it will be closed when the variable goes out of scope Unreleased mutexesTake a look at this Go code type App struct mutex sync Mutex data map string string func app App DoSomething input string app mutex Lock defer app mutex Unlock do something with data and input So far so good but when we want to process many items things can go very bad fastfunc app App DoManyThings input string for item range input app mutex Lock defer app mutex Unlock do something with data and item We just created a deadlock because the mutex lock is not released when expected but at the end of the function In the same way RAII in Rust helps to prevent unreleased mutexes for item in input let guard mutex lock expect locking mutex do something mutex is released here as guard is dropped Missing switch casesLet s imagine we are tracking the status of a product on an online shop const StatusUnknown Status StatusDraft Status StatusPublished Status switch status case StatusUnknown case StatusDraft case StatusPublished But then if we add the StatusArchived Status variant and forget to update this switch statement the compiler still happily accepts the program and lets us introduce a bug While in Rust a non exhaustive match produces a compile time error derive Debug Clone Copy enum Platform Linux MacOS Windows Unknown impl fmt Display for Platform fn fmt amp self f amp mut fmt Formatter gt fmt Result match self Platform Linux gt write f Linux Platform Macos gt write f macOS Compile time error We forgot Windows and Unknown Invalid pointer dereferenceAs far as I know it s not possible to create a reference to an invalid address in safe Rust type User struct Foo Bar is it intended to be used a a pointer or as an optional field And even better because Rust has the Option enum you don t have to use null pointer to represent the absence of something struct User foor Option lt Bar gt it s clear that this field is optional Uninitialized variablesLet s say that we are processing users accounts type User struct ID uuid UUID CreatedAt time Time UpdatedAt time Time Email string func app App CreateUser email string now time Now UTC user User ID uuid New CreatedAt now UpdatedAt now Email email err app repository CreateUser app db user Good but now we need to add the field AllowedStorage int to the User structure If we forget to update the CreateUser function the compiler will still happily accept the code without any changes and use the default value of an int which may not be what we want While the following Rust codestruct User id uuid Uuid created at DateTime lt Utc gt updated at DateTime lt Utc gt email String allowed storage i fn create user email String let user User id uuid new created at now updated at now email email we forgot to update the function to initialize allowed storage produces a compile time error preventing us from shooting ourselves in the foot Unhandled exceptions and errorsIt may sound stupid but you can t have unhandled exceptions if you don t have exceptions panic exists in Rust but that s not how recoverable errors are handled Thus by imposing the programmers to handle each and every errors or the compiler refuses to compile the program all while providing ergonomic tools to handle errors the Result enum and the operator the Rust compiler helps to prevent most if not all errors related to error handling Data racesThanks to the Sync and Send traits Rust s compiler can statically assert that no data race is going to happen How does it work You can learn more in this good write up by Jason McCampbell Hidden StreamsIn Go data streams are hidden behind the io Writer interface On one hand it allows to simplify their usage On the other hand it can reserve some surprise when used with types we don t expect to be a stream a bytes Buffer for example And that s exactly what happened to me a month ago a bytes Buffer was reused in a loop to render templates which led the templates to be appended to the buffer instead of the buffer to be cleaned and reused It would have never happened in Rust as Streams are a very specific type and would never have been used in this situation Some Closing ThoughtsAre smart compilers the end of bugs and code reviews Of course not But a strong type system and the associated compiler are a weapon of choice for anyone who wants to drastically reduce the number of bugs in their software and make their users customers happy Want to learn more Take a look at my book Black Hat Rust to learn Rust Security and applied Cryptography 2022-10-10 11:49:35
海外TECH DEV Community How I Created a React Native Ecommerce App for Medusa's Hackathon https://dev.to/medusajs/how-i-created-a-react-native-ecommerce-app-for-medusas-hackathon-4am7 How I Created a React Native Ecommerce App for Medusa x s HackathonMedusa is currently hosting a Hackathon where developers can create amazing projects with Medusa and win prizes and swag An example of a Hackathon project is building an ecommerce app with React Native which is covered in this article This is part of Creating a React Native ecommerce App with Medusa series In the previous article you learned how to set up the Medusa server and admin and how to create a basic ecommerce app In this part you will learn how to implement cart and checkout functionalities You can also find the source code of the React Native app on GitHub PrerequisitesYou need a Stripe account you can signup here Clone the Starter CodeIf you skipped part you can clone the code from GitHub To do that simply run the below command git clone b part Once you have cloned the repository move to the newly created directory react native medusajs by running cd react native medusajs Run the below command to install the node modules yarn installThe above command will install the necessary packages and dependencies from the NPM registry After the dependencies are installed successfully run expo start to start the application You can either scan the QR code using your device or run the app on an Android iOS simulator You should see a similar screen once the app is opened on your device emulator Make sure that the Medusa server is running as well You might need to modify the URL in constants urls js if you can t see the products You can update the base URL to the IP address where the backend server is running Creating the CartThe first step is to implement the cart functionality Install async storage to save the cart id in the device s local storage Run the below command to install react native async storage async storage in the project expo install react native async storage async storageOnce the package is installed open the project in any code editor and paste the below code into App js before the return function const getCartId gt axios post baseURL store carts then res gt AsyncStorage setItem cart id res data cart id In the above code you created a function named getCartId and inside of that function you are querying the backend API to get a cart id using Axios and then saving it in the device s local storage using async storage Make sure to import async storage useEffect Axios and baseURL in the App js file import axios from axios import baseURL from constants url import useEffect from react import AsyncStorage from react native async storage async storage The above function getCartId will not run since you didn t call it yet However you want to run this function only if there is no cart id saved in the device s local storage Now write another function to check if there s already a cart id in the device s local storage If there isn t the function should call getCartId Lastly call the checkCartId inside of useEffect Check cart id const checkCartId async gt const cartId await AsyncStorage getItem cart id if cartId getCartId useEffect gt checkCartId Adding Products to the CartFirst let s update the button component and add a prop to update the button layout based on the size provided You can replace the code inside components Button js with the code below import View Text StyleSheet from react native import React from react import widthToDp from rn responsive screen export default function Button title onPress style textSize large return lt View style styles container style large amp amp styles large gt lt Text style styles text fontSize textSize textSize widthToDp onPress onPress gt title lt Text gt lt View gt const styles StyleSheet create container backgroundColor CAFF padding width widthToDp alignItems center justifyContent center borderRadius large width marginTop height widthToDp text color fff fontWeight bold Recall that by the end of Part you have created a component at components ProductInfo MetaInfo js to display the description size and other information about the product Go ahead and add a button component after the description lt Button title Add to Cart onPress addToCart large true gt Also make sure to import the button component from components Button import Button from Button As you can see you are calling addToCart function when the user presses the button so declare that function On top of MetaInfo js component before return declare a new function named addToCart and add the below code inside of it const addToCart async gt const cartId await AsyncStorage getItem cart id axios post baseURL store carts cartId line items variant id product variants id quantity then data gt alert Item product title added to cart catch err gt console log err In the above code first you are fetching the cart id from async storage and then posting the product s first variant with quantity to the cart API Next you are navigating users to the cart screen You also need to import AsyncStorage axios and baseURL in the MetaInfo js file import axios from axios import baseURL from constants url import AsyncStorage from react native async storage async storage Cart ScreenThis is the screen where the user will see the products they added to the cart Create a new file named screens Cart js and use it to render a simple Text component for now import View Text from react native import React from react export default function Cart return lt View gt lt Text gt Cart Screen lt Text gt lt View gt Then import the cart screen at the top of App js import Cart from screens Cart Add a new Scene component below the existing Scene component in the returned JSX lt Scene key cart component Cart hideNavBar gt In the components directory create a new file named CartItem js and add the following content import View Text StyleSheet Image from react native import React from react import heightToDp width widthToDp from rn responsive screen export default function CartItem product return lt View style styles container gt lt Image source uri product thumbnail style styles image gt lt View style styles info gt lt View gt lt Text style styles title gt product title lt Text gt lt Text style styles description gt product description • product unit price lt Text gt lt View gt lt View style styles footer gt lt Text style styles price gt product total lt Text gt lt Text style styles quantity gt x product quantity lt Text gt lt View gt lt View gt lt View gt const styles StyleSheet create container marginTop flexDirection row borderBottomWidth paddingBottom borderColor eee width widthToDp image width widthToDp height heightToDp borderRadius title fontSize widthToDp fontWeight bold footer flexDirection row justifyContent space between info marginLeft widthToDp flexDirection column justifyContent space between marginVertical heightToDp width widthToDp description fontSize widthToDp color ee marginTop heightToDp price fontSize widthToDp quantity fontSize widthToDp The above code is a simple React Native cart component which will be rendered on the cart screen You are passing the props to the component from the parent component This is the component that will represent an item in the cart Next in the screens Cart js file add the below function and useState before the return statement to fetch the products from the cart API and store them in the state const cart setCart useState const fetchCart async gt Get the cart id from the device storage const cartId await AsyncStorage getItem cart id Fetch the products from the cart API using the cart id axios get baseURL store carts cartId then data gt Set the cart state to the products in the cart setCart data cart useEffect gt Calling the fetchCart function when the component mounts fetchCart In the above code you are getting the cart id from the device storage fetching the products from the cart API and saving the data to the state Next you are calling the function inside of useEffect Replace the import at the top of the screens Cart js file with the code below import View Text StyleSheet from react native import React useEffect useState from react import Header from components Header import axios from axios import baseURL from constants url import CartItem from components CartItem import ScrollView from react native gesture handler import SafeAreaView from react native safe area context import width widthToDp from rn responsive screen import Button from components Button import Actions from react native router flux import AsyncStorage from react native async storage async storage Now that you have fetched the data and saved it to the state it s time to render the products on the cart screen Replace everything below useEffect function with the below code return SafeAreaView is used to avoid the notch on the phone lt SafeAreaView style styles container gt SchrollView is used in order to scroll the content lt ScrollView contentContainerStyle styles container gt Using the reusable header component lt Header title My Cart gt Mapping the products into the Cart component cart items map product gt lt CartItem product product gt lt ScrollView gt Creating a seperate view to show the total amount and checkout button lt View gt lt View style styles row gt lt Text style styles cartTotalText gt Items lt Text gt Showing Cart Total lt Text style styles cartTotalText color CCC gt Dividing the total by because Medusa doesn t store numbers in decimal cart total lt Text gt lt View gt lt View style styles row gt Showing the discount if any lt Text style styles cartTotalText gt Discount lt Text gt lt Text style styles cartTotalText color CCC gt cart discount total lt Text gt lt View gt lt View style styles row styles total gt lt Text style styles cartTotalText gt Total lt Text gt lt Text style styles cartTotalText color CCC gt Calculating the total cart total cart discount total lt Text gt lt View gt lt View gt A button to navigate to checkout screen lt Button large true onPress gt Actions checkout cart title cart items length gt Checkout Empty Cart gt lt View gt lt View gt lt SafeAreaView gt Styles const styles StyleSheet create container flex backgroundColor fff alignItems center row flexDirection row justifyContent space between width widthToDp marginTop total borderTopWidth paddingTop borderTopColor EEE marginBottom cartTotalText fontSize widthToDp color Next you ll add a basic and simple button component in the screens Products js in order to navigate to the cart screen Add the below code after the ScrollView component in the screens Products js screen lt View style styles addToCart gt lt Feather name shopping cart size color white onPress gt Actions cart gt lt View gt Make sure to also add the style object inside StyleSheet create function addToCart position absolute bottom right backgroundColor CAFF width widthToDp height widthToDp borderRadius widthToDp alignItems center padding widthToDp justifyContent center You also need to import the feather icons from expo vector icons at the top of the file import Feather from expo vector icons Test Cart ScreenThe cart screen is ready Make sure that the Medusa server is running then re run your React Native app Try adding a few products into the cart and then view the cart Your cart screen should look like this Checkout amp PaymentNow that we have completed the cart flow it is time for checkout flow Configure the Stripe PluginNavigate to the Medusa server directory and install the Stripe plugin by running the command below npm install medusa payment stripeAdd the following code at the end of the plugins array in the medusa config js const plugins resolve medusa payment stripe options api key process env STRIPE API KEY For this tutorial I used Stripe to handle payments Navigate to the Stripe dashboard and make sure to turn on the toggle button of Test Mode on the top right Click the developers button beside the Test Mode On the left choose API key and you can find the Publishable key and Secret key Copy the two keys as you will need them later In the env file paste your secret key where is it written STRIPE API KEY Enable Stripe as a Payment ProviderMake sure that the Medusa server and admin panel is running Now open the Medusa admin panel and choose Settings from the Sidebar Then choose Regions Then choose the regions you want to add Stripe as a payment provider In the right side settings click on the three dots icon and choose “Edit Region Details In the new window that opens choose Stripe in the payment providers field Once you re done click the save and close button CheckoutComing back to the React Native app create a new file screens Checkout js and add a simple Text component to it import View Text from react native import React from react export default function Checkout return lt View gt lt Text gt Checkout lt Text gt lt View gt Then import the checkout screen at the top of App js import Checkout from screens Checkout Add a new Scene component below the existing Scene components in the returned JSX lt Scene key checkout component Checkout hideNavBar gt In the components folder create a new file named ShippingAddress js and you can add the following code to it Importing a few package and componentsimport View StyleSheet Text TextInput from react native import React useState from react import heightToDp from rn responsive screen export default function ShippingAddress onChange Passing onChange as a prop Declaring a few states to store the user s input const firstName setFirstName useState const lastName setLastName useState const AddressLine setAddressLine useState const AddressLine setAddressLine useState const city setCity useState const country setCountry useState const province setProvince useState const postalCode setPostalCode useState const phone setPhone useState const company setCompany useState const email setEmail useState Function to handle the user s input const handleChange gt Creating an object to store the user s input let address first name firstName last name lastName email address AddressLine address AddressLine city province postal code postalCode phone company country Calling the onChange function and passing the address object as an argument onChange address return Creating a view to hold the user s input lt View style styles container gt Creating a text input for the user s first name lt TextInput onChangeText e gt Setting the user s input to the firstName state setFirstName e Calling the handleChange function handleChange placeholder First Name style styles input gt lt TextInput onChangeText e gt setLastName e handleChange placeholder Last Name style styles input gt lt TextInput onChangeText e gt setEmail e handleChange placeholder Email style styles input gt lt TextInput onChangeText e gt setAddressLine e handleChange placeholder Address Line style styles input gt lt TextInput onChangeText e gt setAddressLine e handleChange placeholder Address Line style styles input gt lt TextInput onChangeText e gt setCity e handleChange placeholder City style styles input gt lt TextInput onChangeText e gt setCountry e handleChange placeholder Country style styles input gt lt TextInput onChangeText e gt setProvince e handleChange placeholder Province style styles input gt lt TextInput onChangeText e gt setPostalCode e handleChange placeholder Postal Code style styles input gt lt TextInput onChangeText e gt setPhone e handleChange placeholder Phone style styles input gt lt TextInput onChangeText e gt setCompany e handleChange placeholder Company style styles input gt lt View gt Creating a stylesheet to style the viewconst styles StyleSheet create container marginTop heightToDp input borderWidth padding borderColor EEE borderRadius marginTop In the above code you imported a few components and created a function that handles the onChange event for the inputs You have also created a few TextInputs for the shipping address Create a new file named RadioButton js in the components folder and add the below code to it It is a very simple component that will render radio buttons import View Text StyleSheet TouchableOpacity from react native import React from react const RadioButton onPress selected children gt return lt View style styles radioButtonContainer gt lt TouchableOpacity onPress onPress style styles radioButton gt selected lt View style styles radioButtonIcon gt null lt TouchableOpacity gt lt TouchableOpacity onPress onPress gt lt Text style styles radioButtonText gt children lt Text gt lt TouchableOpacity gt lt View gt const styles StyleSheet create radioButtonContainer flexDirection row alignItems center marginRight radioButton height width backgroundColor FFF borderRadius borderWidth borderColor EEE alignItems center justifyContent center radioButtonIcon height width borderRadius backgroundColor CAFF radioButtonText fontSize marginLeft export default RadioButton Create another file named stripe js in the constants folder and add the below code Make sure to update the YOUR STRIPE PUBLISHABLE KEY with your publishable key const publishable key YOUR STRIPE PUBLISHABLE KEY export publishable key Next install the Stripe SDK for react native using the command below npm install stripe stripe react nativeNow update the checkout screen screens Checkout js by replacing the imports with the below components and dependencies import View Text StyleSheet from react native import React useEffect useState from react import Header from components Header import axios from axios import baseURL from constants url import ScrollView from react native gesture handler import SafeAreaView from react native safe area context import heightToDp widthToDp from rn responsive screen import Button from components Button import ShippingAddress from components ShippingAddress import Payment from components Payment import publishable key from constants stripe import RadioButton from components RadioButton import CardField useStripe from stripe stripe react native import AsyncStorage from react native async storage async storage import StripeProvider from stripe stripe react native Next create a few useStates that will be used to capture the input values in the Checkout component const paymentInfo setPaymentInfo useState const shippingAddress setShippingAddress useState const shippingOptions setShippingOptions useState const selectedShippingOption setSelectedShippingOption useState const paymentSession setPaymentSession useState const confirmPayment useStripe Create two functions that will be used to capture the input values that we will declare later on const selectedShippingOption setSelectedShippingOption useState const handlePaymentInputChange card gt setPaymentInfo card values const handleAddressInputChange address gt setShippingAddress address When the page opens and before the payment providers are displayed to the customer to choose from you must initialize the payment sessions To do that we create a function named InitializePaymentSessions and call it on useEffect function Here is what the code should look like const InitializePaymentSessions async gt Getting cart id from async storage let cart id await AsyncStorage getItem cart id Intializing payment session axios post baseURL store carts cart id payment sessions then data gt axios post baseURL store carts cart id payment session provider id stripe then data gt setPaymentSession data cart payment session useEffect gt Calling the function to fetch the payment options when the component mounts fetchPaymentOption Next create other functions to handle payment Add the below functions the the Checkout js const handlePayment async gt Getting client secret from the payment session state const clientSecret paymentSession data paymentSession data client secret paymentSession client secret const billingDetails email shippingAddress email phone shippingAddress phone addressCity shippingAddress city addressCountry shippingAddress country addressLine shippingAddress address addressLine shippingAddress address addressPostalCode shippingAddress postalCode const error paymentIntent await confirmPayment clientSecret type Card billingDetails if error alert Payment failed error if paymentIntent alert Payment successful Calling the complete cart function to empty the cart and redirect to the home screen completeCart const completeCart async gt const cartId await AsyncStorage getItem cart id Sending a request to the server to empty the cart axios post baseURL store carts cartId complete then async res gt Removing the cart id from the local storage await AsyncStorage removeItem cart id Redirecting to the home screen Actions push products Calling the API when user presses the Place Order button const placeOrder async gt Getting cart id from async storage let cart id await AsyncStorage getItem cart id Post shipping address to server axios post baseURL store carts cart id shipping address shippingAddress then data gt Post shipping method to server axios post baseURL store carts cart id shipping methods option id selectedShippingOption then data gt Calling the handle Payment API handlePayment const fetchPaymentOption async gt Getting cart id from async storage let cart id await AsyncStorage getItem cart id Fetch shipping options from server axios get baseURL store shipping options cart id then data gt setShippingOptions data shipping options Initializing payment session InitializePaymentSessions These functions handle retrieving payment and shipping options from Medusa It also handles processing the payment through Stripe and then handles the checkout in Medusa You can also replace the return function with the below code return lt StripeProvider publishableKey publishable key gt lt SafeAreaView style styles container gt lt ScrollView gt lt Header title Checkout gt lt View style styles address gt lt Text style styles title gt Shipping Address lt Text gt lt ShippingAddress onChange handleAddressInputChange gt lt View gt lt View style styles payment gt lt Text style styles title gt Payment lt Text gt lt CardField postalCodeEnabled false placeholders number cardStyle backgroundColor FFFFFF textColor style width height marginVertical onCardChange cardDetails gt handlePaymentInputChange cardDetails onFocus focusedField gt console log focusField focusedField gt lt View gt lt View style styles shipping gt lt Text style styles title gt Shipping Options lt Text gt shippingOptions map option gt lt View style styles shippingOption gt lt RadioButton onPress gt setSelectedShippingOption option id key option id selected selectedShippingOption option id children option name gt lt View gt lt Button onPress placeOrder large title Place Order gt lt View gt lt ScrollView gt lt SafeAreaView gt lt StripeProvider gt Lastly add the below style object at the end of the file const styles StyleSheet create container flex backgroundColor fff address marginHorizontal widthToDp payment marginHorizontal widthToDp marginTop heightToDp shipping marginHorizontal widthToDp title fontSize widthToDp shippingOption marginTop heightToDp And that s it You should now be able to make payments and purchase items from the store Test CheckoutNow try adding a few items to the cart and navigate to the checkout screen you should be able to add an address and make payment Here is what the checkout screen should look like What s Next This article is part of Creating an ecommerce app using Medusa and React Native You can also add more functionalities using Medusa Add a search engine using MeiliSearch Check out the documentation for what more you can do with Medusa Should you have any issues or questions related to Medusa feel free to reach out to the Medusa team via Discord 2022-10-10 11:48:39
海外TECH DEV Community Resource.fyi - Free Tools and Resources for Developers https://dev.to/resource/introducing-resourcefyi-free-tools-and-resources-for-developers-1pee Resource fyi Free Tools and Resources for DevelopersResource tools and product directory sites are evolving day by day and getting popular among developers designers marketers and creators Developers and designers found them easy to grab and go with any kind of proven tools from just one page and these resources sites also saves valuable time since creators and collaborators curate them carefully after reviewing one by one But very few maintained properly and have options to upvote resources users like and bookmark them for later Introducing Resource fyiResource fyi not just a massive repository and hub for curated list of the best free resources products amp tools for developers designers and marketers But also allows users to support product and tools they love and bookmark them to use for later Resource categories are frequently updated to serve fresh and quality tools and products You can also submit a tool you like to showcase on resource fyi our team will review your submission and approve it ASAP to maintain the quality How it can improve workflow Those who complete any task within less time than others what do you think that they have With their talent and time management they also choose the right set of tools and resources to have their work cut out for them These pages provide you with loads of tools UI kits Themes Templates and many more Resource fyi has everything you need for web design and development to ease your work process And these resources and tools will help you to make your projects easier and finish faster Available Resource and Tool CategoriesAPIChrome ExtensionsCloud StorageColors and GradientsDesign InspirationDesign ResourcesDesign ToolsDeveloper ToolsFontsHostingIconsIllustrationsLogosMarketingNewslettersNo CodeOpen SourcePayment GatewaysSkill DevelopmentStock PhotosUI LibrariesWeb DevelopmentWeb TemplatesWebWhat you need like they provide API Chrome Extensions Cloud Storage Colors And Gradient Design Resources Design Tools Developer Tools Fonts Hosting etc all are here in just one place You don t need to spend your time searching various tools from several pages Also you can submit any tools here Just click the submit button So without spending time here let s dive into the main attraction of our tools resources and products collections If you have any feedback or something can be improved please let us know by comments Also you can DM us on Twitter 2022-10-10 11:06:57
海外TECH DEV Community 2022 Beginner Friendly Modern Data Engineering Career path With Learning Resources. https://dev.to/grayhat/2022-beginner-friendly-modern-data-engineering-career-path-with-learning-resoures-26bi Beginner Friendly Modern Data Engineering Career path With Learning Resources Start by trying to understand the fundamentals what data engineering is some of the common task that data engineer performs at different companies common data terminology and learn how to define your problems before you tackle them Work with SQL to use databases for storing reading and updating data Learn the fundamentals of Python programming working in notebooks logic and functions and data structures Get to grips with everything about public cloud You can use one for instance if you choose to use AWS learn about a host of services offered by AWS and work hands on with them to work with data and applications in the cloud Learn how to connect large data sources in the cloud to create data lakes Understand data analytics as it pertains to big data and data lakes Learn how to build data pipelines Learn how to get your data where you want it and when using tools like Apache Hadoop and Apache Spark Gain practical experience writing functions in Apache Spark to test quality metrics and learn how to document data lineage You can read more about this and more from the presentation we had for Data Science East Africa Data Engineering Bootcamp here Here are some of the resources i used when i was getting started in data engineering Python SQLAmazon Web Services AWS Microsoft AzureGoogle Cloud Platform Apache SparkPlease add any useful resources that you think might be important for an aspiring data engineer in the comment section Thank you for reading all through and all the best as you explore and build your world class data engineering career ️ 2022-10-10 11:06:27
Apple AppleInsider - Frontpage News How to Watch 'It's the Great Pumpkin, Charlie Brown' in 2022 https://appleinsider.com/inside/apple-tv-plus/tips/how-to-watch-its-the-great-pumpkin-charlie-brown-in-2022?utm_medium=rss How to Watch x It x s the Great Pumpkin Charlie Brown x in In the Charlie Brown halloween special is exclusively on Apple TV Here s how to watch it Apple TV bought the rights to the Charlie Brown back catalog ーand the rights to make new specials ーback in One consequence of the deal was that for the first time in decades families would not be able to enjoy seasonal Charlie Brown specials on ABC However the family tradition did get to continue in a way as Apple made a deal with PBS to air particularly popular specials Until now the way it worked was that Apple TV users get access all year round while PBS viewers see one airing around the time of the holiday Read more 2022-10-10 11:48:11
Apple AppleInsider - Frontpage News Daily deals Oct. 10: $79 Apple TV HD, $289 50-inch Pioneer 4K Smart TV, $72 off Kindle Paperwhite bundle, more https://appleinsider.com/articles/22/10/10/daily-deals-oct-10-79-apple-tv-hd-289-50-inch-pioneer-4k-smart-tv-72-off-kindle-paperwhite-bundle-more?utm_medium=rss Daily deals Oct Apple TV HD inch Pioneer K Smart TV off Kindle Paperwhite bundle moreMonday s best deals include off the inch iPad Pro reconditioned AirPods Max for a Monoprice W Stereo Hybrid Tube Amplifier for and much more Best Deals for October AppleInsider checks online stores daily to uncover discounts and offers on hardware and other products including Apple devices smart TVs accessories and other items The best offers are compiled into our regular list for our readers to use and save money Read more 2022-10-10 11:34:23
海外TECH Engadget The Morning After: What to expect from Microsoft's Surface event https://www.engadget.com/the-morning-after-what-to-expect-from-microsofts-surface-event-111514566.html?src=rss The Morning After What to expect from Microsoft x s Surface eventDid you think the big tech events were over for the year This week it s Microsoft s turn and we re expecting lots of Surface news That might include a long overdue Surface Studio refresh and even a mini desktop First up is the Surface Pro It ll reportedly use th generation Core i and i U series processors considerably faster than the Pro s th gen parts Don t expect much to change on the outside though It s likely the Surface Pro will largely resemble its predecessor with a inch Hz display and two Thunderbolt ports Some wild cards exist like the previously teased Project Volterra a compact desktop for developers building ARM native Windows apps with AI features It might look like a Mac mini but it seems to be pitched at developers We ve outlined everything else we re expecting to see right here The event kicks off on Wednesday October th at AM ET Mat Smith nbsp The biggest stories you might have missedThe best midrange smartphones for Erica Synths Pērkons review A uniquely thunderous drum machine Persona Portable and Persona Golden arrive on current gen consoles this JanuaryWelcome to the age of the cargo bikeHitting the Books Steve Jobs iPhone obsession led to Apple s silicon revolutionChromecast with Google TV HD review Super simple p streamingAll Apple AirPods and Mac accessories could feature USB C by Things are suddenly moving fast According to Bloomberg s Mark Gurman Apple should transition all of its wireless earbuds to the USB C charging standard by The company may even refresh accessories like the Magic Mouse with USB C as early as next year The reported shift would put most of Apple s products in compliance with the European Union s upcoming USB C mandate The European Parliament recently voted to make the port the common charging standard across the EU Once enacted any new phones tablets and headphones released in the bloc will need USB C charging by the end of This will extend to laptops in Continue reading Chromecast with Google TV HD reviewSuper simple p streaming For the Chromecast with Google TV HD it s clear Google didn t try to do too much As Engadget s Sam Rutherford put it that s totally OK because the original blueprint works fine It s just tailored for p screens this time You get the same great UI a nifty compact remote for all the basics and more than good enough performance ーfor just So if you ve got an aging set or secondary display that could benefit from a modern streaming TV OS this is probably the solution Continue reading Watch the latest Star Trek Picard trailerIt suggests the series will end with a bang ParamountParamount has shared a new trailer for the final season of Star Trek Picard at New York Comic Con After the previous teasers mostly played up the nostalgia of the principal cast of The Next Generation returning to the franchise the new trailer finally offers a glimpse at season three s story New threats getting the old band back together and some surprise additions Continue reading The Engadget Podcast The Pixel and Google s new family of devicesGoogle is getting better at this whole gadget thing EngadgetThis week we dived into everything we learned at Google s Pixel event Sure it s nice to have new phones but it s even nicer to see Google developing a cohesive design for all of its new devices The Pixel Watch actually looks cool And while we were ready to knock the way too late Pixel Tablet its speaker base seems genuinely useful Continue reading Epic Games and Match Group want to bring more antitrust allegations against GoogleThey claim the company paid developers to prevent Play Store competition Epic Games and Match Group are attempting to expand their lawsuits against Google In a motion filed last Friday with a federal court in the Northern District of California the two companies accused Google of paying off developers who had the means and ability to create competing Android app stores Continue reading Rivian recalls EVs due to a potential steering control problemThat s almost all the vehicles Rivian has ever delivered Rivian is recalling EVs almost all its delivered electric trucks and SUVs due to an issue that could render drivers unable to steer and control their vehicles The company issued the recall after seven reports that a fastener connecting the steering knuckle to the vehicle s upper control arm quot may not have been sufficiently torqued quot nbsp The automaker is hoping it can check all affected vehicles within days Rivian told customers they can bring their vehicles to service centers to have the fasteners tightened in minutes nbsp Continue reading 2022-10-10 11:15:14
Cisco Cisco Blog Meet Simon from Cisco Insider Advocates https://blogs.cisco.com/insidervoices/meet-simon-from-cisco-insider-advocates advocates 2022-10-10 11:46:59
ニュース BBC News - Home Shock and horror after Russia's wave of strikes across Ukraine https://www.bbc.co.uk/news/world-europe-63199721?at_medium=RSS&at_campaign=KARANGA adams 2022-10-10 11:11:21
ニュース BBC News - Home Kwasi Kwarteng brings forward economic plan to 31 October https://www.bbc.co.uk/news/business-63129555?at_medium=RSS&at_campaign=KARANGA balance 2022-10-10 11:30:08
ニュース BBC News - Home Lucy Letby: Nurse denies baby murders at start of trial https://www.bbc.co.uk/news/uk-england-merseyside-63201201?at_medium=RSS&at_campaign=KARANGA murder 2022-10-10 11:54:48
ニュース BBC News - Home Harvey Weinstein to go on trial in Los Angeles https://www.bbc.co.uk/news/entertainment-arts-63197830?at_medium=RSS&at_campaign=KARANGA angelesthe 2022-10-10 11:12:06
ニュース BBC News - Home Ukraine in maps: Tracking the war with Russia https://www.bbc.co.uk/news/world-europe-60506682?at_medium=RSS&at_campaign=KARANGA crimea 2022-10-10 11:25:23
ニュース BBC News - Home Enock Mwepu: Brighton midfielder forced to retire with heart condition https://www.bbc.co.uk/sport/football/63200049?at_medium=RSS&at_campaign=KARANGA condition 2022-10-10 11:27:42
ニュース BBC News - Home Emma Raducanu to lead Great Britain team at Billie Jean King Cup Finals https://www.bbc.co.uk/sport/tennis/63200402?at_medium=RSS&at_campaign=KARANGA glasgow 2022-10-10 11:35:35

コメント

このブログの人気の投稿

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