投稿時間:2021-04-23 21:36:53 RSSフィード2021-04-23 21:00 分まとめ(58件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] 新型コロナワクチンの接種人数を都道府県別に表示 ヤフーが新サービス https://www.itmedia.co.jp/news/articles/2104/23/news131.html 新サービス 2021-04-23 20:46:00
IT ITmedia 総合記事一覧 [ITmedia News] 内閣府の共有ストレージに不正アクセス 231人分の個人情報が流出 https://www.itmedia.co.jp/news/articles/2104/23/news129.html itmedia 2021-04-23 20:27:00
IT MOONGIFT Better GitHub - GitHubのコードリーディング体験を改善 http://feedproxy.google.com/~r/moongift/~3/UQkgcDn09Pk/ 自分好みのフォントを使ってコードリーディングをしたい、そんな方はBetterGitHubを使ってみましょう。 2021-04-23 21:00:00
python Pythonタグが付けられた新着投稿 - Qiita [python]echo serverをマルチクライエントに対応しましょう https://qiita.com/iari/items/d006d17ff03c6e507403 pythonechoserverをマルチクライエントに対応しましょう概要前回pythonで簡単なechoサーバーを作りましょうは、pythonで簡単なechoサーバーを作成しました。 2021-04-23 20:40:48
python Pythonタグが付けられた新着投稿 - Qiita PythonでDiscordボットを作ろう!! https://qiita.com/shmn7iii/items/570ec14fcfadb49f2651 作成できたら表示される画面で上からGitHubを選択作成したレポジトリ名を入力しSearch下に出てきたらConnectボタンをクリックしましょう。 2021-04-23 20:28:09
python Pythonタグが付けられた新着投稿 - Qiita DataFrameとSeriesのapply()メソッドにおけるaxis https://qiita.com/tiger-for-fun/items/9e18b676e1f5205c0efe DataFrameとSeriesのapplyメソッドにおけるaxis背景以下のようにTypeErrorが出て、「あれ、なんでだ」ってなってたので、記録する。 2021-04-23 20:06:24
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ActiveHash実装時のNameError https://teratail.com/questions/334841?rss=all ActiveHash実装時のNameErrorActiveHash実装ecedcbfdepngアソシエーションが組めていないためかidが流れていない状態かと思っています。 2021-04-23 21:00:09
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) php8 Apache/2.4.6 で class PDO not foundが出る https://teratail.com/questions/334840?rss=all phpApacheでclassPDOnotfoundが出るcentOS環境です。 2021-04-23 20:51:23
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) terraform 複数環境の構築 main.tf modules の使い方 https://teratail.com/questions/334839?rss=all terraform複数環境の構築maintfmodulesの使い方前提・実現したいことterraformでAWS環境を構築しています。 2021-04-23 20:50:55
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Flutterのfavorite_buttonを使うと動的に色が変わらない https://teratail.com/questions/334838?rss=all Flutterのfavoritebuttonを使うと動的に色が変わらないfavoritebuttonというものを使っているのですが、思うようにsetStateがきかず原因がわからず困っています・・以下、サンプルプログラムを作成しました。 2021-04-23 20:43:06
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) pip install pillow ができない https://teratail.com/questions/334837?rss=all 名前が正しく記述されていることを確認し、パスが含まれている場合はそのパスが正しいことを確認してから、再試行してください。 2021-04-23 20:29:54
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) WEBサーバー内の特定のファイルを削除しても復活してしまう。 https://teratail.com/questions/334836?rss=all WEBサーバー内の特定のファイルを削除しても復活してしまう。 2021-04-23 20:28:24
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) HEROKUでseedファイルのデータを反映できません。 https://teratail.com/questions/334835?rss=all HEROKUでseedファイルのデータを反映できません。 2021-04-23 20:27:04
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Pythonでのくじ引きの作り方(if文) https://teratail.com/questions/334834?rss=all Pythonでのくじ引きの作り方if文前提・実現したいことプログラミング初心者です。 2021-04-23 20:21:08
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) vmstatに時刻とCPU数を結合して1行に出力したい https://teratail.com/questions/334833?rss=all vmstatに時刻とCPU数を結合して行に出力したいやりたいことvmstatに時刻とCPU数を結合して行に出力したい。 2021-04-23 20:20:39
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) PythonのMap関数に関して https://teratail.com/questions/334832?rss=all PythonのMap関数に関して基本的で済みませんが、PythonのMap関数の使い方について確認させてください。 2021-04-23 20:13:49
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 入力された値が範囲内かを確認したい https://teratail.com/questions/334831?rss=all 入力された値が範囲内かを確認したい前提・実現したいこと入力された日付が、あらかじめ決められた日付の範囲内かを確認したいです。 2021-04-23 20:04:25
Ruby Rubyタグが付けられた新着投稿 - Qiita Rails初学者がRailsアプリのトップページを作り上げるまでにぶつかった壁と解決策についてまとめてみた https://qiita.com/hexanitrobenzen/items/9ff833a0516c6faa7cdc OSをmacに変えてみたPermissionエラーターミナルにてこちらの記事を参考にしつつセットアップを進めていきましたところ、railsをインストールしようとする過程でエラーが置きました。 2021-04-23 20:53:06
AWS AWSタグが付けられた新着投稿 - Qiita AWS EC2の新機能「ルートボリューム置き換え」で障害時のリストア対応を迅速化する https://qiita.com/nasuvitz/items/238170a223a6e809b80d AWSECの新機能「ルートボリューム置き換え」で障害時のリストア対応を迅速化するはじめにのAWSのアップデートで、実行中のECインスタンスのルートボリュームを置き換える機能が発表されました。 2021-04-23 20:55:48
AWS AWSタグが付けられた新着投稿 - Qiita AWS CLI で EC2 の情報取得、開始、停止 https://qiita.com/gogotokage/items/fd97298a1a4672a12c8f AWSCLIでECの情報取得、開始、停止目的インスタンスを起動しっぱなしにしていたのでコマンドから停止したい。 2021-04-23 20:02:51
Ruby Railsタグが付けられた新着投稿 - Qiita クレジットカード決済用JavaScript準備 ⑨環境設定2 https://qiita.com/takuo_maeda/items/5b889eb1d019968c0548 クレジットカード決済用JavaScript準備⑨環境設定JavaScriptで環境変数を呼び込みましょうRailsで設定した環境変数をJavaScriptで呼び出せません。 2021-04-23 20:02:43
技術ブログ Developers.IO LINE公式アカウントのBotモードによる応答でojichatに喋ってもらいました https://dev.classmethod.jp/articles/line-ojichat-webhook/ ojichat 2021-04-23 11:05:18
海外TECH Ars Technica NASA’s bold bet on Starship for the Moon may change spaceflight forever https://arstechnica.com/?p=1757643 starship 2021-04-23 11:30:28
海外TECH Ars Technica Rocket Report: Amazon bypasses New Glenn, SLS ready for Florida shipment https://arstechnica.com/?p=1759479 capabilities 2021-04-23 11:00:53
海外TECH DEV Community Top 10 Customer Relationship Management (CRM) Software in 2021 https://dev.to/invokker/top-10-customer-relationship-management-crm-software-in-2021-2d9k Top Customer Relationship Management CRM Software in Customer relationship management CRM software is crucial for every organization to enhance their relationships with their clients Additionally this software also helps track record and manage every customer interaction on a central server Every business might have a different requirement depending on their business process As a reason you need to choose the best CRM software that understands the business objectives and helps to achieve them There are multiple CRM system vendors in the market which is why it might be difficult to choose the best one We are a software recommendation platform and made a list of the top ten CRM software in depending on their features The following list of software is in alphabetical order Creatio CRMCreatio CRM system is an all inclusive platform to enhance marketing sales and customer service It is an end to end platform that provides tools for all the departments and helps enrich the customer experience One of the superpowers of this solution is that it has a BPM engine to change processes quickly Additionally it also provides a days free trial so that you can understand how this CRM software adapts to your business Features Customer degree view Customer segmentation Manage omnichannel marketing campaigns Lead qualification Lead engagement Lead distribution Lead analysis Opportunity management Furthermore there are multiple features this CRM solution can offer which you can explore on their profile page Digital CRMDigital CRM is an online CRM software that allows you to automate most aspects of the workflow process This software solution allows you to have an unlimited number of users and records with admin role management Moreover you can install this software on your webserver localhost or on premises This CRM system allows you to customize the software according to your business needs One of the best advantages of this solution is that it is affordable without any hidden charges Features Salesforce automation CRM dashboard Contact management Lead management Sales pipeline Reports and analytics Lead management Role management Freshsales CRMFreshsales CRM software has all the necessary tools to make your sales force better This software solution integrates artificial intelligence to score lead phone email and activity capture Additionally it acts as a central server for your team to access degrees of your customer profile because it captures and gathers customer experience in a single platform One of the top CRM systems that allow you to customize to fit your business needs Furthermore it increases the productivity of your team with the help of automation Features Workflow automation Customer lifecycle Sales analytics Marketing analytics Email campaigns Conversion rate optimization Deal management Chat campaigns Event tracking Sales sequences These are the top features of this system you can explore more on their profile page Want to view full list then please visit my lates CRM blog at gt 2021-04-23 11:24:13
海外TECH DEV Community Las 8 mejores herramientas de autor de e-learning para usar en el 2021 https://dev.to/feygele/las-8-mejores-herramientas-de-autor-de-e-learning-para-usar-en-el-2021-23cc Las mejores herramientas de autor de e learning para usar en el Elegir una herramienta de autor de e learning puede a veces tomar un esfuerzo parecido al de crear el curso Hacer una comparación de herramientas de autor no es tan fácil como parece ya que no solamente se trata del conjunto de funcionalidades técnicas de una herramienta sino también de cómo va a encajar en tu flujo de trabajo Una herramienta ideal permite al diseñador instruccional enfocarse en desarrollar un buen contenido de aprendizaje sin tener que preocuparse sobre problemas técnicos pero al mismo tiempo es lo suficientemente flexible como para hacer una visión realidad En este artículo echaremos un vistazo de cerca a ocho populares herramientas de autor de desarrolladores líderes incluyendo iSpring Articulate Adobe Elucidat y Trivantis Entonces empecemos Antes de adentrarnos en el tema aquípresentamos una tabla de comparación rápida si estás corto de tiempo iSpring SuiteClasificación reseñas CapterraPlataforma WindowsPrecio € por autor añoDescuentos Académico sin fines de lucroPrueba dias muestra gratis iSpring Suite es un conjunto de herramientas de autor de eLearning diseñadas para crear rápidamente cursos en línea Estáintegrado a PowerPoint asíque el contenido de las presentaciones puede ser fácilmente aprovechado y reutilizado Puedes crear cursos de aspecto profesional que incluyan cuestionarios o evaluaciones y simulaciones de diálogo sin la necesidad de programación de código técnico o formación extensa Los cursos desarrollados pueden ser archivos de salida en todos los formatos populares de eLearning incluyendo SCORM xAPI cmi y HTML Más adecuada paraiSpring Suite es una herramienta sencilla que te permitirácrear cursos inmediatamente después de su compra Si alguna vez has creado una presentación de PowerPoint entonces iSpring Suite seráintuitivo para ti Serás capaz de crear tu primer curso sin ninguna formación previa Es una buena herramienta para aquellos que quieren rápidamente lanzar su curso en línea Esta herramienta te permitiráenfocarte en diseñar contenido de aprendizaje rápidamente sin tener que lidiar con problemas técnicos Puedes probar iSpring Suite registrándote para una prueba gratuita Adobe CaptivateClasificación reseñas CapterraPlataforma Windows y iOSPrecio Suscripción mensual por o €Descuentos Estudiantes y maestrosPrueba Prueba gratuita de díasAdobe Captivate es una herramienta a nivel profesional para desarrollar contenido eLearning y experiencias de aprendizaje compatibles con dispositivos móviles Es una herramienta de autor con funciones completas que te da un amplio control sobre todos los aspectos de tu curso y te permite personalizarlo a través de elementos programables tales como objetos variables y eventos desencadenantes Captivate puede presumir de un conjunto de funciones robustas sin embargo tiene un estilo de diseño lineal tradicional en comparación con herramientas de autor más modernas Más adecuada paraEste es un gran programa si quieres ofrecerle a tus estudiantes una extensa experiencia de aprendizaje móvil incorporar funciones de VR o crear simulaciones de programas Es la más adecuada para desarrolladores de eLearning con experiencia que estén cómodos trabajando con variables y algo de código para hacer realidad la magia Articulate Clasificación reseñas CapterraPlataforma WindowsPrecio por usuario anualmenteDescuentos Académico licencias por equipos de trabajoPrueba Prueba gratuita de díasArticulate estáposicionada como una herramienta integral para la creación revisión e implementación de eLearning El conjunto de herramientas incluye nueve productos de Articulate Storyline Studio Replay Preso PeekServicios Web Rise Review Content Library y Articulate Live Tres de estas herramientas están diseñadas principalmente para la creación de cursos Articulate Studio Si eres nuevo en eLearning pero sabes cómo trabajar con PowerPoint seráfácil empezar con Articulate Studio que es una adición a Powerpoint Articulate RiseArticulate Rise está basado en la web y utiliza bloques para permitirte crear cursos lineales simples al incluir tu contenido Articulate Storyline Articulate Storyline es la herramienta de autor independiente más avanzada Su interfaz es similar a PowerPoint asíque algunas opciones serán intuitivas para usuarios novatos Te permite crear cursos eLearning que incluyen la función de narración vídeo y animación También puedes crear cuestionarios para evaluar a los estudiantes simulaciones e interacciones de arrastrar y soltar Más adecuada paraEquipos de trabajo que harán uso de todos los componentes de lo contrario pagarás de más por la herramienta completa El inconveniente es que la mayoría de los desarrolladores individuales y las organizaciones de pequeñas a medianas no necesitarán todas estas herramientas algunas de las cuales se duplican entre ellas mismas pero todavía tendrás que comprar el conjunto completo como parte de la licencia de suscripción Lectora InspireClasificación reseñas CapterraPlataforma WindowsPrecio por una licencia de por vidaDescuentos Académico Gobiernos Precio solo con la solicitudPrueba Prueba gratuita de díasLectora Inspire es un conjunto de herramientas diseñadas para abordar las diferentes necesidades de los creadores de cursos desde crear cursos básicos basados en diapositivas hasta crear proyectos personalizados a profundidad Se diferencia de otras herramientas porque incluye servicios externos como parte del paquete como las plantillas de eLearning Brothers templates caracteres de avatar y un creador de interacciones Es más fácil pensar en Lectora como la herramienta principal con muchas funciones adicionales incluidas que puedes usar para crear diferentes tipos de contenido Más adecuada paraEsta es una herramienta poderosa pero complicada Permite personalizaciones extensas a través de la programación de código librerías externas y scripts Debido a esta extensibilidad Lectora requiere que los desarrolladores estén bien entrenados Asíque esta es una buena opción si eres un desarrollador experimentado con habilidades en programación tienes un diseñador en tu equipo y creas cursos que están principalmente basados en elementos interactivos complejos ElucidatClasificación reseñas ElucidatPlataforma SaaSPrecio Precio no indicado debes contactar al vendedorDescuentos No especificadoPrueba Prueba gratuita ofrecida solamente al final de la demostración en vivo la cual debe reservarse y programarse en líneaElucidat es una herramienta de autor de eLearning basada en la nube que te permite producir contenido compatible con HTML y SCORM Permite a todo el equipo de trabajo contribuir a crear eLearning revisarlo y tomar parte en el proceso de autoría Elucidat ofrece muchas funciones básicas que se esperan de una herramienta de autor de HTML tales como crear evaluaciones y cuestionarios gestión de audio y video y llenar un curso con imágenes y texto Más adecuada paraElucidat se adapta bien a organizaciones con equipos de formación y desarrollo distribuidos y requisitos para impartir variaciones de curso según la localidad pero que no tienen la necesidad de crear cursos basados en diapositivas o altamente personalizados para ellos o sus clientes dominKnowClasificación reseñas CapterraPlataforma Windows solamentePrecio Desde año por usuario únicoDescuentos Organizaciones sin fines de lucro Educativos Precio solo con la solicitudPrueba Prueba gratuita de días dominKnow es una plataforma de autor basada en la nube diseñada para equipos y organizaciones grandes Su objetivo es permitirte crear diferentes tipos de eLearning con plantillas banco de recursos una biblioteca central para compartir y reutilizar contenido en distintos proyectos y colaboración y revisión en tiempo real dominKnow tiene realmente tres herramientas principales Tiene un creador de cursos compatibles con dispositivos móviles un creador de cursos más tradicional que te permite convertir presentaciones de PPT y una herramienta para capturar y generar simulaciones de sistemas Todo el contenido usado en cualquiera de las herramientas de autor se guarda como un objeto discreto que puede ser reutilizado y publicado en varios formatos como Knowledge Base o Job Aid Más adecuada paraAquellos que buscan una herramienta de autor de eLearning que produzca resultados de alta calidad a la vez que sea bastante fácil de aprender y usar especialmente para las organizaciones que utilizan autores independientes que necesitan mantener el contenido gestionado y accesible para equipos grandes de trabajo EasygeneratorClasificación reseñas CapterraPlataforma SaaSPrecio mes usuarioDescuentos Organizaciones sin fines de lucro Educacionales Precio solamente bajo aplicaciónPrueba Prueba gratuita de días Easygenerator es una herramienta de autor de eLearning para personas sin experiencia en desarrollo Te permite crear cursos y cuestionarios para ser alojados en el entorno de nube integrado y asípoder monitorear los resultados También es posible subir los cursos a un sitio web o LMS Más adecuada paraAquellos buscando una herramienta en línea para crear fácilmente cursos compatibles con dispositivos móviles usando funciones de arrastrar y soltar como su principal requerimiento AdaptClasificación No tiene calificacionesPlataforma SaaSPrecio GratisAdapt es una herramienta HTML de código abierto que estádiseñada para permitirte crear un producto de aprendizaje que se adapta a múltiples dispositivos a través de su sitio Learning Pool Adapt Builder Asíes como funciona Introduces un tema haciendo clic en el bloque y después navegas hacia abajo en la página trabajando en tu contenido abriendo y cerrando pestañas en forma de acordeón secuencias narrativas imágenes con puntos de acceso y otras herramientas interactivas Más adecuada paraAquellos buscando una herramienta de autor de HTML flexible y gratuita y que no les importe adaptarse a los requerimientos de instalación y ser autosuficientes Para resumirCualquiera de estas herramientas de autor te permitirácrear cursos pero ahora deberías tener una idea más clara sobre cuál herramienta es la mejor para tu situación particular y el tipo de contenido que deseas crear ¿Utilizas algunas de estas herramientas de autor de e learning Nos encantaría saber más de tus experiencias buenas o malas en los comentarios Original source 2021-04-23 11:23:08
海外TECH DEV Community Grokking Traversable https://dev.to/choc13/grokking-traversable-bla Grokking TraversableOnce you ve grokked traversable s you ll wonder how you ever lived without them Trying to gain intuition about them by staring at the type signature never brought me much joy So in this post we ll take a different approach and invent them ourselves by solving a real problem This will help us get to that aha moment where we finally understand how they work and when to use them The scenarioImagine we re working for an e commerce site where we sell one time offers such that when all the stock is sold we never have anymore When a user places an order we must check the stock levels If there is availability we temporarily reserve the amount they requested before letting them proceed to the checkout Our specific task is to write a createCheckout function that will take a Basket and try to reserve the items in it If they can be successfully reserved it will create a Checkout which includes the total price of the items along with other metadata we might need to take the payment Our domain model looks something like this type BasketItem ItemId ItemId Quantity float type Basket Id BasketId Items BasketItem list type ReservedBasketItem ItemId ItemId Price float type Checkout Id CheckoutId BasketId BasketId Price float The createCheckout function will return Checkout option It will return Some if all of the items are available and None if any of them aren t A better implementation would return Result and detail the specific errors but we ll use option to keep the example simple let createCheckout basket Basket Checkout optionFortunately for us someone else has already written a function which can reserve a BasketItem if it is in stock which looks like this let reserveBasketItem item BasketItem ReservedBasketItem optionAgain this will return None if there are not enough items in stock Our first implementationSo it seems that all we need to do is write a function that calls reserveBasketItem for each item in the basket If they all succeed then it calculates the total price in order to create the Checkout Let s try it let createCheckout basket let reservedItems basket Items gt List map reserveBasketItem let totalPrice reservedItems gt List sumBy fun item gt item Price Id CheckoutId some checkout id BasketId basket Id Price totalPrice Here we re just mapping over the items in the basket to reserve each one and then summing their individual prices to get the total basket price Seems straight forward except that s not going to compile because it s not quite right The problem is that reservedItems has the type list lt option lt ReservedBasketItem gt gt but we need it to be option lt list lt ReservedBasketItem gt gt where it is None if any one of the reservations fail That way we d only be able to calculate the total price and create the Checkout if all of the items are available Let s imagine we ve written such a function called reserveItems that does return this type instead and updated createCheckout to use it let reserveItems items BasketItem list option lt list lt ReservedBasketItem gt gt let createCheckout basket let reservedItems basket Items gt reserveItems reservedItems gt Option map fun items gt Id CheckoutId some checkout id BasketId basket Id Price items gt List sumBy fun x gt x Price That s better Now if the items are all reserved and reservedItems returns Some then we can access the list of ReservedBasketItem and use them to create the Checkout If any of the items can t be reserved then reservedItems returns None and the Option map just short circuits meaning createCheckout will also return None as we wanted So we ve reduced the task to implementing reserveItems We ve already seen that we can t just call List map reserveBasketItem because that gives us a list lt option lt ReservedBasketItem gt gt and so the list and the option are the wrong way around We need a way to invert them An invertor Let s invent a function called invert that converts list lt option lt ReservedBasketItem gt gt into option lt list lt ReservedBasketItem gt gt If we can do that then we can implement reserveItems like this let invert reservedItems list lt option lt ReservedBasketItem gt gt option lt list lt ReservedBasketItem gt gt let reserveItems items BasketItem list option lt list lt ReservedBasketItem gt gt items gt List map reserveBasketItem gt invertIn order to implement invert let s start off by pattern matching on the list let invert reservedItems list lt option lt ReservedBasketItem gt gt option lt list lt ReservedBasketItem gt gt match reservedItems with head tail gt do something when the list isn t empty gt do something when the list is emptySo we ve got two cases to deal with when the list has at least one item and when the list is empty Let s start with the base case because it s trivial If the list is empty then it doesn t contain any failures so we should just return Some In the non empty case then we ve got to do something with head which is a ReservedBaskedItem option and tail which is a list lt option lt ReservedBasketItem gt gt Well we know that our goal is to turn list lt option lt ReservedBasketItem gt gt into option lt list lt ReservedBaskedItem gt gt so we can just recursively call invert on the tail to do this let rec invert reservedItems list lt option lt ReservedBasketItem gt gt option lt list lt ReservedBasketItem gt gt match reservedItems with head tail gt let invertedTail invert tail Need to recombine the head and the inverted tail gt Some Now we just need a way to combine a ReservedBasketItem option with a option lt list lt ReservedBasketItem gt gt If neither of these were wrapped in an option then we would just cons them using the operator so let s write a consOptions function which does this but for option arguments let consOptions head option a tail option lt list lt a gt gt option lt list lt a gt gt match head tail with Some h Some t gt Some h t gt NoneNothing too complicated going on here Simply check if both the head and tail are Some and if so cons them with operator and wrap that in a Some Otherwise if either one is None then return None Putting it all together we can finally implement invert like this let rec invert reservedItems list lt option lt a gt gt option lt list lt a gt gt match reservedItems with head tail gt consOptions head invert tail gt Some We ve also been able to make it completely generic on the type inside the list as it doesn t depend on ReservedBasketItem in any way An Applicative clean up If you re familiar with applicatives perhaps because you ve followed this series and read Grokking Applicatives then you might have spotted that consOptions looks sort of like a specialised version of apply What consOptions is trying to do is take some values that are wrapped in options and apply them to a function in this case cons Let s make use of apply and clean up invert let rec invert list An alias for so we can pass it as a function below let cons head tail head tail match list with head tail gt Some cons gt apply head gt apply sequence tail gt Some In fact a proper Applicative instance should also have a pure function All pure does is create a default value for the Applicative In the case of option pure is just Some Let s use pure to replace the Some uses let rec invert list let cons head tail head tail match list with head tail gt pure cons gt apply head gt apply invert tail gt pure This might not seem like much of a change but what we ve done is eliminate all direct dependencies on option In theory this could work with any applicative such as Result or Validation and what it would do is go from list lt Applicative lt gt gt to Applicative lt list lt gt gt In practice however F doesn t quite allow such an abstraction and so we have to create a version of invert for each applicative type we want to use it with You can technically get around this with statically resolved type parameters I would recommend checking out FSharpPlus if you want this abstraction rather than rolling it yourself though You just discovered sequence invert is usually called sequence and it s one of the functions that a Traversable type gives us As we can see sequence takes a collection of wrapped values like an option and turns it into wrapped collection instead You can think of sequence as flipping the two types over sequence works for all sorts of other type combinations too For example you can take a list lt Result lt a gt gt and flip it into a Result lt list lt a gt gt You can even use it with different collection types and some that don t even seem like typical collections for instance you could go from Result lt option lt a gt e gt to option lt Result lt a e gt gt Test yourself on sequence ‍See if you can implement sequence for list lt Result lt gt gt to Result lt list lt gt gt Solution module Result let apply a f match f a with Ok g Ok x gt g x gt Ok Error e Ok gt e gt Error Ok Error e gt e gt Error Error e Error gt e gt Error let pure Oklet rec sequence list let cons head tail head tail match list with head tail gt Result pure cons gt Result apply head gt Result apply sequence tail gt Result pure That s right it s exactly the same as for the list lt option lt gt gt providing we use the applicative Result apply and Result pure functions for Result I ve included their definitions too in a Result module above There s still more land to discover Let s go back to our original program and see how it looks with our new sequence discovery let createCheckout basket let reservedItems basket Items gt List map reserveBasketItem gt sequence reservedItems gt Option map fun items gt Id CheckoutId some checkout id BasketId basket Id Price items gt Seq sumBy fun x gt x Price It s pretty good but we have to make two passes over the basket Items when creating reservedItems In the first pass we try and reserve each item and then in the second pass we combine all of those reservations together to determine whether the whole operation succeed or not It would be nice if we could do that in one go Let s see if we can do it all within sequence That means that we ll need to pass the reserveBasketItem function to sequence and we ll end up with the following signature let sequence f a gt b option list a list option lt list lt b gt gt So we start with a list and we want to apply the function f to each element of it Although rather than just mapping over the list and returning list lt option lt b gt gt we want to accumulate all of the option values into a single option lt list lt b gt gt where it is None if for any element f produces a None let rec sequence f list let cons head tail head tail match list with head tail gt Some cons gt apply f head gt apply sequence tail f gt Some This is basically the same as before except now we just apply f to head and pass it into the recursive call in order to also transform the tail elements All we ve done is combine the operation that generates the option values with the act of combining them together into a single option of the list You just discovered traverse It turns out we typically call the function traverse when we combine both the sequencing and the mapping at the same time So a Traversable actually has two functions associated with it called sequence and traverse In fact sequence is just a special case of traverse where we supply the identity function id for f So we could actually write it like this let sequence traverse idWith traverse in place we can finally finish off our task and write checkoutBasket nicely like this let createCheckout basket basket Items gt traverse reserveBasketItem gt Option map fun items gt Id CheckoutId some checkout id BasketId basket Id Price items gt Seq sumBy fun x gt x Price Test yourself on traverse ‍See if you can implement traverse when the input is option lt a gt and the function is a gt Result lt b c gt so that it returns a Result lt option lt b gt c gt Solution module Result let apply a f match f a with Ok g Ok x gt g x gt Ok Error e Ok gt e gt Error Ok Error e gt e gt Error Error e Error gt e gt Error let pure Oklet traverse f opt match opt with Some x gt Result pure Some gt Result apply f x None gt Result pure NoneHere I ve included the definitions of apply and pure for Result and then implemented traverse using those Hopefully this makes it clearer which parts of the traverse operation relate to the outer option type and which ones relate to the inner Result type One concrete use case for this transformation might be if we re trying to write a parser The parser function might say parse string into Result lt int ParseError gt but we have to hand a string option Of course we could pattern match on the option ourselves and then only run the parser in the Some case but we could also write myOptionalValue gt traverse parseInt Another interesting case is when we re dealing with a regular function say string which just converts the argument to a string See if you can figure out what traverse should look like this case Specifically if we want to write gt traverse string and have it output Solution module Identity let apply a f f a let pure f flet rec traverse list f let cons head tail head tail match list with head tail gt Identity pure cons gt Identity apply f head gt Identity apply traverse tail f gt Identity pure I ve written this in the same style as the others by extracting an Identity functor applicative Identity is actually the degenerate case for an applicative because all apply does is call the function with the argument and all pure does is return the function unaltered So there is no wrapping going on like with the other applicatives This is interesting though because traverse now has the type list lt a gt gt a gt b gt list lt b gt which you might recognise from Grokking Functors as map So map is actually a special case of traverse when the inner type is just the Identity applicative Spotting Traversable in the wild Whenever you ve got some collection of values wrapped in something like option or Result and what you actually need is an option lt list lt a gt gt or Result lt list lt a gt e gt etc then sequence is probably what you need to use Similarly if you have to run a computation over a collection that produces wrapped values then you can use traverse and combine the mapping and flipping into one operation Warning two types of error handling ahead ️When we re sequencing a list lt option lt gt gt we generally only need to know that at least one of the elements is None in order to return None However when working with something like list lt Result lt a e gt gt then we might actually care about gathering up all of the errors As we pointed out in Grokking Applicative Validation there can be applicative instances that either short circuit on the first error or accumulate all errors The same applies here with Traversable Let s quickly run some experiments in the F REPL with FSharpPlus to see how it handles things gt Ok Error first error Error second error gt sequence val it Result lt int list string gt Error first error Success Failure first error Failure second error gt sequence val it Validation lt string list int list gt Failure first error second error In the first case when using Result we see that it just returns the first error it encounters while with Validation it actually accumulates all the errors for us What did we learn ‍Traversable is more powerful version of map that is particularly useful when we have a computation that either needs to be run or has already been run over a list of values and we want to treat it as a failure if any single one fails We can also grok it by realising that it flips the two outer types over We use traverse when we still need to run the computation and sequence when we ve been given the list of computation results instead 2021-04-23 11:14:02
海外TECH DEV Community Manage your Finances 💰with this notion template https://dev.to/xenoxdev/manage-your-finances-with-this-notion-template-22k5 Manage your Finances with this notion templateHey folks Just launched another Product on the Product hunt It s a template that helps you manage your finances Finance Manager TemplateWhen we think about Finances what comes to our mind are the earnings and the spendings We aim to maximize our earnings and minimize irrational spending But to effectively change our spending pattern we need to track it first With this Finance Tracking template you ll not only be able to keep track of exactly where each penny has been spent but also how much percentage of total funds it makes up for Let s take a look at this wonderous template that will change your spending habits for the better and make your savings skyrocket ExpensesExpenses are broken down into the following Essentials The spending that can t be skipped eg Utility bills taxes etc Debt and interest payments Noting down any change in the interest rates and calculating the monthly spending accordingly by making use of inbuilt formulasDiscretionary spending For services that save your money in the long term but require payment upfront for eg Amazon Prime etc Subscriptions Ongoing and canceled and finally savings Income distributionThere s a column for the Income distribution that gives you a birds eye view so that you can manage and cut down or reallocate funds where priority is the greatest Keep your coupons handyYou can keep track of your coupons in a separate column so that you don t forget about them and use them in your next payment and save some money Organize your receiptsFinally you are also provided with a receipt section so that you can manage and keep your invoices which will later help you during your tax returns ViewsYou can choose a view of your choice so that you can keep track of your expenses and understand how and when they re taking place by viewing your expense list in a view of your choice All the lists and trackers in this template are available in table board timeline list calendar and gallery view Now you can choose to set lists or assign your expenses to boxes until you find the perfect match between aesthetic and function Want One Here is your link Finance TrackerWe are on Producthunt today Please show some love hereThanks again 2021-04-23 11:05:58
Apple AppleInsider - Frontpage News New, thicker 12.9-inch iPad Pro can't use previous Magic Keyboard https://appleinsider.com/articles/21/04/23/new-thicker-129-inch-ipad-pro-cant-use-previous-magic-keyboard?utm_medium=rss New thicker inch iPad Pro can x t use previous Magic KeyboardBuyers of the new inch iPad Pro will not be able to use the previous model s Magic Keyboard Credit Andrew O Hara AppleInsiderAs noted by AppleInsider after the new iPad Pro launch Apple has been listing the Magic Keyboard as new prompting speculation about revisions to the design It s now been revealed that there is a change and it is to do with accommodating the new iPad Pro s mm thicker chassis Read more 2021-04-23 11:52:31
Apple AppleInsider - Frontpage News Spotify to launch rival podcast subscriptions to Apple https://appleinsider.com/articles/21/04/23/spotify-to-launch-rival-podcast-subscriptions-to-apple?utm_medium=rss Spotify to launch rival podcast subscriptions to AppleSpotify is reportedly planning to introduce a paid podcast subscription service and not take a cut of revenue as Apple s new Podcast subscriptions will Apple Podcasts left and SpotifyFollowing Apple s announcement of paid subscription podcasts rival Spotify is said to be about to introduce a competing service as soon as next week It s part of Spotify s continued expansion of non music services Read more 2021-04-23 11:07:46
海外TECH Engadget The 2020 iPad Pro is at an all time low as 2021 pre-orders open https://www.engadget.com/2020-ipad-pro-all-time-low-good-deal-114011339.html price 2021-04-23 11:40:11
海外TECH Engadget The Morning After: Testing Apple's AirTags https://www.engadget.com/the-morning-after-testing-apple-air-tags-112736773.html The Morning After Testing Apple x s AirTagsToday s headlines CD Projekt Red made hundreds of millions on Cyberpunk made hundreds of millions despite the refunds Signal hacked some Cellebrite s phone hacking software used by law enforcement and the next version of iOS may revamp notifications 2021-04-23 11:27:36
海外科学 NYT > Science Highlights From SpaceX’s Launch of 4 Astronauts for NASA https://www.nytimes.com/live/2021/04/23/science/spacex-nasa-launch/ Highlights From SpaceX s Launch of Astronauts for NASAThe Crew mission is the third to carry people to the International Space Station “It s great to be back in space said the flight s commander 2021-04-23 11:30:09
医療系 医療介護 CBnews コロナ対応での「簡易な報告」、算定後でも可-厚労省 https://www.cbnews.jp/news/entry/20210423195131 医療機関 2021-04-23 20:10:00
金融 金融庁ホームページ 企業会計審議会第50回監査部会議事録について公表しました。 https://www.fsa.go.jp/singi/singi_kigyou/gijiroku/kansa/20210322.html 企業会計 2021-04-23 11:30:00
海外ニュース Japan Times latest articles Looming Olympics fail to instill urgency in Japan’s vaccine rollout https://www.japantimes.co.jp/news/2021/04/23/national/2020-tokyo-olympics-covid-19-vaccine-immunity/ rolloutwith 2021-04-23 21:57:18
海外ニュース Japan Times latest articles Suga’s push to raise minimum wage faces uphill battle amid pandemic https://www.japantimes.co.jp/news/2021/04/23/business/minimum-wage-covid-19-japan-yoshihide-suga-ldp/ Suga s push to raise minimum wage faces uphill battle amid pandemicThere is stiff opposition to the plan from small and midsize firms worried about their survival and from ruling party lawmakers fearing a political backlash 2021-04-23 20:37:14
海外ニュース Japan Times latest articles How South Korea stepped up specialty syringe production for COVID-19 vaccines https://www.japantimes.co.jp/news/2021/04/23/asia-pacific/south-korea-specialty-syringe/ How South Korea stepped up specialty syringe production for COVID vaccinesSouth Korea s relative abundance of low dead space syringes has helped it give of its population at least one dose of a coronavirus vaccine 2021-04-23 20:32:08
海外ニュース Japan Times latest articles Rafael Nadal outlasts Kei Nishikori in three sets at Barcelona Open https://www.japantimes.co.jp/sports/2021/04/23/tennis/nadal-outlasts-nishikori/ nadal 2021-04-23 21:13:46
ニュース BBC News - Home Convicted Post Office workers have names cleared https://www.bbc.co.uk/news/business-56859357 miscarriage 2021-04-23 11:38:17
ニュース BBC News - Home India Covid crisis: Hospitals buckle under record surge https://www.bbc.co.uk/news/world-asia-56858403 overflow 2021-04-23 11:51:58
ニュース BBC News - Home Northumberland Longridge Towers School strip club teacher banned https://www.bbc.co.uk/news/uk-england-tyne-56858188 costa 2021-04-23 11:26:59
ニュース BBC News - Home Starmer: PM can't distance himself from 'sleaze' https://www.bbc.co.uk/news/uk-politics-56856901 dyson 2021-04-23 11:19:10
ニュース BBC News - Home Schoolboy missing for three days after Tower Bridge fall, police confirm https://www.bbc.co.uk/news/uk-england-london-56847002 investigation 2021-04-23 11:22:51
ニュース BBC News - Home Euro 2020: Wembley given extra last-16 tie - which could involve England https://www.bbc.co.uk/sport/football/56856744 Euro Wembley given extra last tie which could involve EnglandWembley is given an extra Euro last tie which could involve England as Dublin loses its four fixtures because of Covid issues 2021-04-23 11:53:00
ニュース BBC News - Home Sarah Voss: German gymnast's outfit takes on sexualisation in sport https://www.bbc.co.uk/news/world-europe-56858863 championship 2021-04-23 11:13:21
ニュース BBC News - Home Lobbying row exposes ministers' text habit https://www.bbc.co.uk/news/uk-politics-56842946 exposes 2021-04-23 11:10:23
ニュース BBC News - Home O'Sullivan in danger of exit as McGill takes four-frame lead at Crucible https://www.bbc.co.uk/sport/snooker/56858543 O x Sullivan in danger of exit as McGill takes four frame lead at CrucibleRonnie O Sullivan s quest for a seventh world title is in danger of ending in round two as Anthony McGill builds a lead 2021-04-23 11:50:45
ニュース BBC News - Home 'Big six' took a slap over European Super League, says Newcastle boss Bruce https://www.bbc.co.uk/sport/football/56856090 x Big six x took a slap over European Super League says Newcastle boss BruceThe big six Premier League clubs have taken a slap over their involvement in the European Super League says Newcastle manager Steve Bruce 2021-04-23 11:21:12
ニュース BBC News - Home Covid map: Coronavirus cases, deaths, vaccinations by country https://www.bbc.co.uk/news/world-51235105 countrykey 2021-04-23 11:18:34
ビジネス ダイヤモンド・オンライン - 新着記事 「たまごっち」が25年間で味わった挫折と成功とは - News&Analysis https://diamond.jp/articles/-/268417 newsampampanalysis 2021-04-23 20:30:00
LifeHuck ライフハッカー[日本版] Amazonタイムセール祭り購入前にやっておきたいこと〜4/24(土)朝9時スタート https://www.lifehacker.jp/2021/04/233507amazon_timesale_2021-04.html amazon 2021-04-23 21:00:00
北海道 北海道新聞 宣言中も五輪テスト大会実施 組織委会長「安全優先で」 https://www.hokkaido-np.co.jp/article/536737/ 東京五輪 2021-04-23 20:19:00
北海道 北海道新聞 谷口と石坂が通算-10で首位 関西オープン第2日 https://www.hokkaido-np.co.jp/article/536705/ 関西オープン 2021-04-23 20:05:00
北海道 北海道新聞 エルサレムで衝突、100人負傷 アラブ人排斥デモ契機に https://www.hokkaido-np.co.jp/article/536734/ 排斥デモ 2021-04-23 20:12:00
北海道 北海道新聞 既存の胃ろう製品、存続訴え 医療的ケア児の家族ら https://www.hokkaido-np.co.jp/article/536733/ 訴え 2021-04-23 20:12:00
ニュース Newsweek 東京都23日のコロナ新規感染759人 小池知事「午後8時以降、街灯以外は消灯を」 https://www.newsweekjapan.jp/stories/world/2021/04/23900.php 2021-04-23 20:15:00
IT 週刊アスキー 『Marvel’s Avengers』の新イベント「タキオン・アノマリー」配信開始! https://weekly.ascii.jp/elem/000/004/052/4052742/ esxswindowspcsteamstadia 2021-04-23 20:15:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

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

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