投稿時間:2022-01-14 21:40:19 RSSフィード2022-01-14 21:00 分まとめ(44件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] FF14、混雑解消にめど 25日から新規ユーザー受け入れ https://www.itmedia.co.jp/news/articles/2201/14/news159.html itmedianewsff 2022-01-14 20:02:00
AWS lambdaタグが付けられた新着投稿 - Qiita AWS SAMで管理するAWS Lambda関数を、単一のAWSアカウント内の複数環境にデプロイする https://qiita.com/charon/items/050942e54bbc5c9d44f1 AWSSAMアプリケーションのデプロイ先を開発環境developmentと本番環境productionのつに対して行うアプリケーション自体は、AWSSAMのQuickStartからHelloWorldExampleNodejsをベースにして作成AWSLambda関数の名前は固定し、どの環境向けの関数なのかを名前でわかるようにする※ひとつのAWSSAMテンプレートで、複数環境にデプロイできるようにカスタマイズ各環境で異なる構成で動作していることがわかりやすいように、アプリケーション内で環境変数を参照するようにする参照する環境変数は、AWSSAMテンプレート内で環境別の値を設定する※…AWSLambda関数名を固定しないFunctionNameを指定しない場合は一意の名前が生成されるので、このお題の意味があまりないかもですが環境今回の環境は、こちらです。 2022-01-14 20:45:39
python Pythonタグが付けられた新着投稿 - Qiita 幅優先、深さ優先探索 https://qiita.com/ppza53893/items/f81b7bfc7ecb3b1c0d42 そうすることで、深さ順にどんどん追加されていくようになる。 2022-01-14 20:40:37
python Pythonタグが付けられた新着投稿 - Qiita 駒の顔画像を自動収集する【スクレイピング - Scrapy編】 https://qiita.com/macochan/items/7a7bc2ee07b4bcc7c2d4 今回は取得したデータからファイル名を作り、キャラクターの顔画像を保存することにします。 2022-01-14 20:01:37
python Pythonタグが付けられた新着投稿 - Qiita DataFrameのリスト要素をNaNが含まれていても結合する方法 https://qiita.com/shimi7o/items/ab7686c0d4464547232d NaNを空文字に置換するすべての要素をリストに変換する。 2022-01-14 20:01:13
Ruby Rubyタグが付けられた新着投稿 - Qiita Railsでコメント機能のajax化 https://qiita.com/mmaumtjgj/items/e5c2621cc6064605b0cc formwithは元からremotetureとなっているのでわざわざ新たに記入する必要はない。 2022-01-14 20:14:47
AWS AWSタグが付けられた新着投稿 - Qiita AWS SAMで管理するAWS Lambda関数を、単一のAWSアカウント内の複数環境にデプロイする https://qiita.com/charon/items/050942e54bbc5c9d44f1 AWSSAMアプリケーションのデプロイ先を開発環境developmentと本番環境productionのつに対して行うアプリケーション自体は、AWSSAMのQuickStartからHelloWorldExampleNodejsをベースにして作成AWSLambda関数の名前は固定し、どの環境向けの関数なのかを名前でわかるようにする※ひとつのAWSSAMテンプレートで、複数環境にデプロイできるようにカスタマイズ各環境で異なる構成で動作していることがわかりやすいように、アプリケーション内で環境変数を参照するようにする参照する環境変数は、AWSSAMテンプレート内で環境別の値を設定する※…AWSLambda関数名を固定しないFunctionNameを指定しない場合は一意の名前が生成されるので、このお題の意味があまりないかもですが環境今回の環境は、こちらです。 2022-01-14 20:45:39
Docker dockerタグが付けられた新着投稿 - Qiita [Docker]/bin/sh: /go/bin/dlv: not found https://qiita.com/tako_tako/items/81fee7742f798ebafd02 解決策dockercomposebuilddockercomposeupで解決しました。 2022-01-14 20:13:52
golang Goタグが付けられた新着投稿 - Qiita [Docker]/bin/sh: /go/bin/dlv: not found https://qiita.com/tako_tako/items/81fee7742f798ebafd02 解決策dockercomposebuilddockercomposeupで解決しました。 2022-01-14 20:13:52
Ruby Railsタグが付けられた新着投稿 - Qiita Railsでコメント機能のajax化 https://qiita.com/mmaumtjgj/items/e5c2621cc6064605b0cc formwithは元からremotetureとなっているのでわざわざ新たに記入する必要はない。 2022-01-14 20:14:47
技術ブログ Developers.IO New AWS Management Console Home – การปรับแต่งหน้าแรกคอนโซล AWS รูปแบบใหม่ https://dev.classmethod.jp/articles/new-aws-management-console-home/ New AWS Management Console Home การปรับแต่งหน้าแรกคอนโซลAWS รูปแบบใหม่ครั้งนี้ผมจะมาแนะนำเกี่ยวกับการปรับแต่งหน้าแรกคอนโซลAWS รูปแบบใหม่สามารถดูวิธีการปรับแต่งหน้าแรกคอนโซลได้ที 2022-01-14 11:30:04
海外TECH MakeUseOf Amazon Fire, Roku, or Apple TV - Which Streaming TV Device Should You Use? https://www.makeuseof.com/amazon-fire-roku-apple-tv-which-streaming-tv-device-should-you-use/ apple 2022-01-14 11:30:12
海外TECH MakeUseOf An Introduction to Focal Length in Photography https://www.makeuseof.com/introduction-to-focal-length-photography/ common 2022-01-14 11:30:12
海外TECH DEV Community Zebrunner and LambdaTest smart test execution and transparent test analytics https://dev.to/lambdatest/zebrunner-and-lambdatestsmart-test-execution-andtransparent-test-analytics-3g7j Zebrunner and LambdaTestsmart test execution andtransparent test analyticsBriefKeeping the effective test automation process usually requires much effort and time from QA teams To simplify test execution and analysis Zebrunner and LambdaTest are happy to present an innovative combo solution that helps QA engineers perform testing in an easier way Now users can run tests via LambdaTest Selenium Grid report test results directly into Zebrunner and quickly analyze them with a wide range of artifacts video screenshots test logs AI ML failure classification and quality trend reports With Zebrunner it s also possible to keep traceability between systems using integrations with the most popular Project Management Quality Assurance tools on the market Join this hour webinar with Zebrunner and LambdaTest to dive deeper into effective test automation with the combo solution Here are the key takeaways Overview what are the benefits of LambdaTest Zebrunner integrationGetting started how to configure LambdaTest and Zebrunner accountsSmart execution how to launch tests on LambdaTest side from ZebrunnerAdvanced test analysis how to detect failures with rich artifacts and AI MLCustomized test reporting how to track product quality with live dashboards 2022-01-14 11:51:52
海外TECH DEV Community 8 ways to become a BETTER SRE ( Right now! ) | 8 non-technical characteristics to have https://dev.to/developertharun/8-ways-to-become-a-better-sre-right-now-8-non-technical-characteristics-to-have-3n4p ways to become a BETTER SRE Right now non technical characteristics to haveSite Reliability Engineering also popularly referred to as the SRE is a role in Computer Science Engineering where the main purpose is to provision maintain monitor and manage the infrastructure to provide maximum application uptime and reliability SRE is an emerging role but the tasks that the SRE does were always there ever since the first application that was developed The scope of the software developers ends where they write code to develop the application and right from setting up the infrastructure the various services that run on them the network connectivity that is required providing a platform for the application to run and making sure every part of the application is up and running reliably x is the duty of an SRE We can consider Site Reliability Engineers are the strong bridge between the users and a reliable application Let us look at ways in which you can become a better SRE at work SRE not just involves various technologies to deal with and keep them running but also several non technical characteristics SRE is all about the right Mindseta No blame gameb Thirst to solveAs an SRE we deal with multiple components and are a bridge between the users and the application Even though the application is well written a bigger responsibility falls upon SRE to keep the applications and the services it uses up and running In this process there might be a few situations where one of the SRE does a mistake that causes a disruption or even an outage When this happens the first thing to happen shouldn t be to blame anyone for the outage but the following has to be performed i Fix the issueii Write an RCA Root Cause Analysis that mentions why the issue occurred in the first place the names can be anonymous iii Mention the first aid and the fix for the issueiv Discuss how the issue can be prevented the next time v Set an ETA for the fixAnother aspect is to have the right mindset to solve problems As an SRE you have the responsibility to optimize the infrastructure fix issues build automation tools monitoring tools and more which requires a lot of problem solving skills Unless you have the thirst to solve the problems you will only feel more stressed out or even worse would cause issues Communicationa Overcommunication is not a problemb Be kind and show empathyAre you performing a production activity or even a stage change that could affect other teams Have you made progress in the project that you are working on Make sure to keep the necessary stakeholders in sync always Write emails send slack messages well in advance before the production activity just before and after the activity It might sound like over communication but trust me as the company scales you need to keep everyone relevant to the component that you are working on in sync This way if they have to take any actions from their side they will do it or if they face any issues post activity they ll know who the right person to get in touch with is One other important characteristic to have as a human being is to be kind and show empathy This will apply to all levels of engineering on either side of the conversation period Whether someone asks a silly question or does a mistake or behaves rudely with you you should never mirror that behavior Stay synced with the teama Do not miss team meetingsb Prevent duplication of workc Do not compete but contributeIn this work from home WFH period the only time where you have an opportunity to speak to your teammates is during a team meet The reason why this is special is you get an opportunity to stay synced with your team on what they all are working on whether they are blocked on any tasks how you can contribute to their tasks and also you will be using this opportunity to convey on what you are working on and get help if necessary This also prevents duplication of work Shadow teammates on tasks and issuesThe best way to learn is by doing it hands on and the best way to begin would be by watching how it is done I also believe that the best way to retain the learned information is by performing it repeatedly This also includes watching your teammates perform the activities It ensures that the activity is done without any mistakes when there are several eyes to watch it No Spoon feeding do homeworkDo not expect all details to be taught by your teammates and seniors Read the documentation watch tutorials read engineering blogs practice on your own and suggest improvisations Even a well built system will have much more efficient solutions that you can propose Be attentive and cautious on productionI ve heard people pretending to work while watching web series They might be proud of their multitasking skills but as far as I know there is no such thing as multitasking at work while watching a web series and I highly recommend one to not do that If you are interested in watching a series I would suggest you use that motivation to focus on the work finish the tasks quickly and reward yourself with a couple of episodes later in the evening Attention is the core necessity of life and the same holds true to an SRE Be attentive to the commands you run the alerts you get the trend the charts show and the logs of the services and applications Prepare for activities well in advance and let the actual activities be a no brainer copy paste so that you can pay attention to other indications during the activity Think before you hit enterDo not underestimate sudo privilege A lot of us have a habit to enter into the sudo mode as soon as we login into a machine which is unnecessary Even if the command you are running looks like a harmless command make sure to get the process and commands reviewed by your teammates seniors or the subject experts this will save you from outages Keep version control systems in syncWhether it is NGINX config or any service config make sure to keep the version control system that is isolated from the system in sync No one hopes for the machine to become unresponsive but when the machine becomes unusable all of a sudden you have another opportunity to bring up alternate machines with the same configs as the previous ones Keeping the version control system in sync also helps in automation Listen to the Podcast with more examples and explanationRead about what Site Reliability Engineering is and what are the main things that the Site Reliability Engineers take part in Link to the ArticleCheck out my YouTube Channel here Developer Tharun YouTube Thank you for reading the article 2022-01-14 11:25:11
海外TECH DEV Community Managed Kubernetes Comparison: EKS vs GKE https://dev.to/rophilogene/managed-kubernetes-comparison-eks-vs-gke-4o2p Managed Kubernetes Comparison EKS vs GKEKubernetes is changing the tech space as it becomes increasingly prominent across various industries and environments Kubernetes can now be found in on premise data centers cloud environments edge solutions and even space As a container orchestration system Kubernetes automatically manages the availability and scalability of your containerized applications Its architecture consists of various planes that make up what is known as a cluster This cluster can be implemented or deployed in various ways including adopting a CNCF certified hosted or managed Kubernetes cluster This article explores and contrasts two of the most popular hosted clusters Amazon Elastic Container Service for Kubernetes EKS and Google Kubernetes Engine GKE You ll compare the tools looking at ease of setup and management compatibility with Kubernetes version releases support for government cloud support for hybrid cloud models cost and developer community adoption Overview of Managed Kubernetes SolutionA managed Kubernetes solution involves a third party such as a cloud vendor taking on some or full responsibility for the setup configuration support and operations of the cluster Google Kubernetes Engine GKE Amazon Elastic Container Service for Kubernetes EKS Azure Kubernetes Service and IBM Cloud Kubernetes Service are examples of managed Kubernetes clusters Managed Kubernetes solutions are useful for software teams that want to focus on the development deployment and optimization of their workloads The process of managing and configuring clusters is complex time consuming and requires proficient Kubernetes administration especially for production environments Overview of GKELet s look at qualities that your organization should consider before choosing GKE as their hosted cluster solution Cluster ConfigurationsGKE has two cluster configuration options or modes as they are called Standard and Autopilot Standard mode This mode allows software teams to manage the underlying infrastructure node configurations of their clusters Autopilot mode This mode offers software teams a hands off experience of a Kubernetes cluster GKE manages the provisioning and optimization of the cluster and its node pools Setup and Configuration ManagementCluster setup and configuration can be a time consuming and arduous process In a cloud environment you must also understand networking topologies since they form the backbone of cluster deployments For teams and operators looking for a solution with less operational overhead GKE has the automated capabilities you re looking for This includes automated health checks and repairs on nodes as well as automatic cluster and node upgrades for new version releases Service MeshSoftware teams deploying applications based on microservice architectures quickly find out that Kubernetes service level capabilities are insufficient in a number of ways Service meshes are dedicated infrastructure layers that address network and security issues at an application service level and help complement large complex workloads GKE comes with Istio installed by default Istio is an open source service mesh implementation that can help organizations secure large and critical workloads Kubernetes Versions and UpgradesIn comparison to EKS GKE offers a wide variety of release versions depending on the release channel you select stable regular or rapid The rapid channel includes the latest version of Kubernetes v at the time of this post GKE also has auto upgrade capabilities for both clusters and nodes in Standard and Autopilot cluster modes No Government Cloud SupportGoogle doesn t offer a government cloud solution like AWS for hosted clusters Any software solutions that require security posture regulation and stringency by government agencies will have to be developed based on your standard regional offerings Exclusive to Cloud VMsA majority of enterprises prefer a hybrid model over other cloud strategies however GKE only offers cluster architecture models that consist of Virtual Machines VMs in a cloud environment For organizations looking to distribute their workloads between nodes in on premise data centers and the cloud EKS would be more suitable Conditional Service Level Agreement SLA When making use of a single zone cluster GKE is the more affordable solution as there are no costs involved in managing the control plane however this solution type doesn t offer a Service Level Agreement SLA unless you opt for a regional cluster solution which costs ten cents per hour for control plane management EKS offers SLA coverage at percent whereas GKE only offers percent for its zonal clusters and percent for its regional clusters CLI SupportThe GKE CLI is a sub module of the official GCP CLI gcloud Once a user has installed gcloud and authenticated with gcloud init they can proceed to perform lifecycle activities on their GKE clusters PricingGKE clusters can be launched either in Standard mode or Autopilot mode Both modes have an hourly charge of ten cents per cluster after the free tier From a pricing perspective GKE differs from EKS because it has a free tier with monthly credits that if applied to a single zonal cluster or Autopilot cluster will completely cover the operational costs involved in running the cluster Use CasesBased on the characteristics outlined above GKE works particularly well in the following scenarios Minimal management overheadHigh degree of operational automationWide support of Kubernetes versions including an option for latest versions Cost effective model for small clustersOut the box service mesh integration with Istio Overview of EKSNow let s take a look at EKS and what factors you should consider before using their hosted cluster solution Cluster ConfigurationsEKS has three cluster configuration options for launching or deploying your managed Kubernetes cluster in AWS These three configurations are managed node groups self managed nodes and Fargate Managed Node GroupsThe launch configuration automates the provision and lifecycle management of your EC worker nodes for your EKS cluster In this mode AWS manages the running and updating of the EKS AMI on your nodes applying labels to node resources and draining of nodes Self managed Worker NodesAs the name implies this option gives teams and operators the most flexibility for configuring and managing their nodes It s the DIY option from the different launch configurations You can either launch Auto Scaling groups or individual EC instances and register them as worker nodes to your EKS cluster This approach requires that all underlying nodes have the same instance type the same Amazon Machine Image AMI and the same Amazon EKS node IAM role Serverless Worker Nodes with FargateAWS Fargate is a serverless engine that allows you to focus on optimizing your container workloads while it takes care of the provisioning and configuration of the infrastructure for your containers to run on EKS AnywhereBusinesses recognize the cloud as a great enabler and are using it to meet their needs in combination with on premise data centers Amazon EKS recently launched Amazon EKS Anywhere which enables businesses to deploy Kubernetes clusters on their own infrastructure using VMware vSphere while still being supported by AWS automated cluster management This deployment supports the hybrid cloud model which in turn enables businesses to have operational consistency in their workloads both on premises and in the cloud At this point in time EKS doesn t offer the option for using bare metal nodes but AWS has stated that this feature is expected in Integration with AWS EcosystemFor years AWS has been the leading cloud compute services provider EKS can easily integrate with other AWS services allowing enterprises to make use of other cloud compute resources that meet their requirements If your business cloud strategy consists of resources in the AWS landscape your Kubernetes workloads can be seamlessly integrated using EKS Developer CommunityEKS has a vast developer community with the highest adoption and usage rate among the Kubernetes managed cluster solutions Because of the complex challenges that configuring and optimizing Kubernetes entails this community offers you a great deal of value as it can support structure around common use cases forms a knowledge base for you to query as you face problems and offers examples from others using similar technologies Government Cloud SolutionAWS has a government cloud solution that enables you to run sensitive workloads securely while meeting the relevant compliance requirements As a result the power of Kubernetes can be used in the AWS ecosystem to support operations that fit this criterion Setup and Configuration ManagementCompared to GKE operating EKS from the console requires additional manual steps and configuration in order to provision the cluster This requires knowledge and proficiency from software teams to understand the underlying networking components of AWS and how it impacts the cluster to be provisioned Furthermore installation of components like Calico CNI as well as upgrading the AWS VPC CNI has to be done manually and EKS doesn t support automatic node health repair checks Kubernetes Versions and UpgradesEKS supports three or more minor Kubernetes version releases not including the most recent Kubernetes release In addition when using EKS Kubernetes version upgrades have to be done manually For software teams that want to stay on top of the latest security patches as well as work with the latest features the limited options that EKS offers can make meeting certain requirements challenging CLI SupportSimilar to GKE EKS has full CLI support in the form of a sub module of the official AWS CLI tool When a software developer configures their AWS profile that has the right permissions with the CLI they can proceed to perform operations on their EKS cluster Updating the local kube config file to contain the credentials for the Kubernetes cluster API endpoint can be done with the following command aws eks update kubeconfig region lt region gt name lt cluster name gt In addition the team from Weaveworks produced an EKS CLI tool called eksctl which is used to implement and manage the lifecycle of EKS clusters in the form of infrastructure as code PricingAmazon EKS charges ten cents per hour which is a fee based on the management of the control plane Any additional charges are incurred based on the standard prices for other AWS resources i e EC instances for worker nodes When Amazon EKS is run on AWS Fargate serverless engine the additional pricing outside of the hourly rate for the control plane is calculated based on the memory and vCPU usage of the underlying resources used to run the container workloads Unlike GKE AWS doesn t offer a limited free tier service for EKS Use CasesBased on the characteristics outlined above EKS works particularly well in the following scenarios Running workloads in a hybrid cloud modelIntegrating workloads with AWS ecosystemDesired support from a large community of practitionersRunning workloads in a dedicated government cloud environment ConclusionBy design managed Kubernetes solutions like EKS and GKE reduce the operational overhead and complexities that come with managing a Kubernetes cluster Each cluster solution has pros and cons that organizations need to consider against their needs and workload requirements Software teams also need to consider an optimal way of deploying their infrastructure and application workloads In this case Qovery can help your teams become more autonomous and efficient Qovery is a cloud agnostic deployment platform that can help teams with Kubernetes cluster management whether EKS or GKE in a scalable way 2022-01-14 11:11:04
海外TECH DEV Community How to override your dependency's dependencies https://dev.to/stefanjudis/how-to-override-your-dependencys-dependencies-ca4 How to override your dependency x s dependenciesnpm released version of their CLI client in December and it looks like an unspectacular release but includes a helpful new feature overrides The JavaScript ecosystem has been on fire since Node js and npm appeared There s always a package for everything and people YOLO publish whatever they please It s a vibrant and enabling ecosystem feeling like the wild wild west And of course there are pros and cons to countless dependencies I love that I can just install another package but share the concerns about the increasing project complexity Suppose your project relies on one dependency that depends on another dependency that again depends on another one just to add two numbers In that case countless things could go wrong npm overrides give you more power over what s installed in your dependency tree Let s say one of your dependencies st level relies on another dependency that includes outdated other dependencies nd level There hasn t been an easy way to update dependencies down the tree other than forking and fixing your first level dependency your project some module another module which should be updated You can now specify an overrides property in your package json to override and enforce dependency versions in the tree overrides bar foo The new feature comes in handy topatch a dependency with a known security issuereplace an existing dependency with a forkmake sure that the same package version is used everywhere It s such a welcome addition thanks npm Read more about it in the npm docs 2022-01-14 11:09:19
海外TECH DEV Community Developer Quickstart: PHP and MariaDB https://dev.to/probablyrealrob/developer-quickstart-php-and-mariadb-e3g Developer Quickstart PHP and MariaDBThe PHP programming language has long been considered a fairly light and simple solution for developers to use to create robust and creative web applications In fact that s as true now as it has ever been as past few versions of PHP have made the language more appealing than ever Like many other languages PHP has the ability to take advantage of the power of MariaDB and it s actually a pretty simple and straightforward process But talk text in this case is cheap So to demonstrate this I ve created a simple PHP web application called Rolodex to manage contacts In this article I m going to highlight from a high level some of the fundamental details of using PHP to connect to and communicate with a MariaDB database Everything I ll be exploring is based on the code for the Rolodex application and if you d like to dive into the code you can check it out here Preparing the databaseBefore jumping into the PHP code for the application it s important to note that it uses a single database called rolodex CREATE DATABASE rolodex The rolodex database contains a single table contacts that is used to store basic information CREATE TABLE rolodex contacts id INT NOT NULL AUTO INCREMENT name VARCHAR NOT NULL age INT NOT NULL email VARCHAR NOT NULL PRIMARY KEY id The SQL necessary to run the Rolodex application can be found in the schema sql file Tip If you don t have an instance of MariaDB up and running yet you can find more information on how to get started in this MariaDB Quickstart Guide Configuring the applicationTo facilitate the use of a MariaDB database within the Rolodex PHP application I ve created a new file called config php that contains the configuration settings and database connection object that can be reused across PHP pages Connecting to and communicating with an underlying MariaDB database is facilitated by the mysqli PHP extension lt php Basic connection settings databaseHost lt host address gt databaseUsername lt user name gt databasePassword databaseName rolodex Connect to the database mysqli mysqli connect databaseHost databaseUsername databasePassword databaseName Within the config php file I ve started by defining variables that hold the host address username password and default database that are used to create a new mysqli connection object which contains a variety of configuration options that you can use to tailor to your environment Executing SQLUsing and reusing the mysqli connection within config php is as easy as including it within a PHP code block on another PHP page lt php Include the database connection fileinclude once config php gt Then with an established connection you have the ability to use a plethora of capabilities from the mysqli extension including executing queries using mysqli query Selecting data lt php Include the database connection fileinclude once config php Fetch contacts in descending order result mysqli query mysqli SELECT FROM contacts ORDER BY id DESC gt Selecting contacts with mysqli queryOr in the case that you need to handle dynamically inserted parameter values you can use mysqli prepare Inserting data stmt mysqli gt prepare INSERT INTO contacts name age email VALUES Inserting contacts using mysqli prepareUpdating data stmt mysqli gt prepare UPDATE contacts SET name age email WHERE id stmt gt bind param sisi name age email id stmt gt execute Updating contacts using mysqli prepareDeleting data stmt mysqli gt prepare DELETE FROM contacts WHERE id stmt gt bind param i id stmt gt execute Deleting contacts using mysqli prepareAs you can see getting started with PHP and MariaDB is easy but we ve only scratched the surface of what s possible If you d like to see for yourself what else is possible with PHP and MariaDB start by checking out the full source code for the Rolodex application in the new PHP Quickstart GitHub repository Learn moreAnd if you d like to learn even more about what s possible with MariaDB be sure to check out the Developer Hub and the new MariaDB Developer Code Central GitHub organization There you can find much more completely open source content just like this spanning a variety of other technologies use cases and even programming languages You can also dive even deeper into MariaDB capabilities in the official MariaDB documentation And as always MariaDB is deeply rooted in open source and would be nothing without their awesome community If you d like to help contribute directly to MariaDB you can find them on GitHub send feedback directly to their Developer Relations team at developers mariadb com or join the conversation in the new MariaDB Community Slack Happy coding 2022-01-14 11:03:00
海外TECH DEV Community Add a 'copy code to clipboard' button to your blog's code blocks https://dev.to/robole/add-a-copy-code-to-clipboard-button-to-your-blogs-code-blocks-545j Add a x copy code to clipboard x button to your blog x s code blocksIf you are writing about code you are likely to include some code blocks to complement what it is you are discussing or explaining To improve the experience for the reader you can consider highlighting the syntax to make it easier to read and adding a copy code button to make it simply for them to copy and paste the code a key developer skill I will show you to do the latter A simple code exampleWe only want to add our button to code blocks that are wrapped inside a pre such as below lt pre gt lt code class language css gt some box width px height px background black margin bottom rem lt code gt lt pre gt In this example I will use the syntax highlighting library Prism this is used in the static site generator Eleventy also According to the HTML spec the recommended way to define the language for a code block is a through a language xxxx class i e language css for CSS code Prism looks for this class to identify blocks to add highlighting to Most syntax highlighting libraries follow a similar convention Prism adds the language xxxx class from the code element to the pre for you This will make it easier for you to target the correct elements in your CSS later Here is the codepen of what I will cover below CSSWe want to position the button absolutely in the top right corner of the pre In our JavaScript code we will add the button as a child of the pre element To achieve this placement we set the pre as position relative and the button as position absolute and set the top and right properties of the button Also we want to add enough top padding to the pre to make space for the button so that the text will never be covered by the button pre class language position relative overflow auto margin px padding rem rem rem rem border radius px button position absolute top px right px font size rem padding rem background color color eee border ridge px bbc border radius px text shadow ccc px You can place the button somewhere else and style it differently if you prefer JavaScriptWe will only want to target the pre elements that contain a code element If you are using a static site generator or JavaScript library for syntax highlighting usually there is a class added to the pre like I demonstrated with Prism earlier If you don t have a class available it is tricker to target the right elements since a query selection along the lines of find me all pre elements that contain a code element is not possible with querySelectorAll because there is no parent selector available in CSS syntax You will need to write some extra JavaScript code to get a reference to these elements Writing to the system clipboard is quite straightforward There is a browser API the Clipboard API which enables you to asynchronously read from and write to the system clipboard The browser support is excellent for writing to the clipboard It is recommended that you use the Clipboard API instead of the deprecated document execCommand method To access the clipboard you use the navigator clipboard global To write to the clipboard there is an async writeText function await navigator clipboard writeText some text How do we get the text of the code element In the button click event handler we need to get the element indirectly We need to get the parent element of the button the pre and then execute querySelector code on it to get a reference the child code element Then we can get text through the element s innerText property This kind of hokey pokey is required when working with the DOM sometimes Let s put it all together then const copyButtonLabel Copy Code you can use a class selector instead if you or your static site generator adds one to the pre If you use a client side library remember the class may not be added by the time this code runs let blocks document querySelectorAll pre blocks forEach block gt only add button if browser supports Clipboard API if navigator clipboard let button document createElement button button innerText copyButtonLabel button addEventListener click copyCode block appendChild button async function copyCode event const button event srcElement const pre button parentElement let code pre querySelector code let text code innerText await navigator clipboard writeText text While the above code works perfectly we don t give any feedback to the user that the code was copied So it might be nice to do something to indicate to the user that the task was completed successfully Adding feedbackThe first thing that popped into my head was to change the button text to Code Copied when the action is done and reset it to Copy Code after a second through setTimeout button innerText Code Copied setTimeout gt button innerText copyButtonLabel If you don t like the fact that the button grows in size when the text is switched you can set a min width equal to the width of the button with the longer text I think that this is good enough but you could add a toast notification or an animation of some sort instead if you want to do something fancier 2022-01-14 11:02:29
Apple AppleInsider - Frontpage News How to share Apple Watch Activity progress with friends & family on watchOS 8 https://appleinsider.com/articles/21/11/12/how-to-share-apple-watch-activity-progress-with-friends-family-on-watchos-8?utm_medium=rss How to share Apple Watch Activity progress with friends amp family on watchOS The Apple Watch makes it easy to share your Activity rings with friends and family to help get you motivated to close your rings ーand here s how to do it If you re the kind of person who feels more motivated when you re measuring up against your friends the Apple Watch has you covered Sharing your activity is easy and just requires you to send an invite to another Apple Watch owner on your contact list If you find that you don t enjoy sharing your activity you can stop at any point Read more 2022-01-14 11:58:00
Apple AppleInsider - Frontpage News Trending hashtag 'iPhone shower' turns a silly accident into ongoing meme https://appleinsider.com/articles/22/01/13/trending-hashtag-iphone-shower-turns-a-silly-accident-into-ongoing-meme?utm_medium=rss Trending hashtag x iPhone shower x turns a silly accident into ongoing memeAfter showering her iPhone one Japanese voice actress and her fans remind us that iPhones are not quite as waterproofed as one might like Don t use the shower to clean your iPhoneA Japanese voice actress named Moeka Koizumi made the mistake of taking her iPhone into the shower thus leading to the creation of the iPhone shower meme This event took place in February but the hashtag has begun trending again Read more 2022-01-14 11:08:21
海外TECH Engadget Block is officially building an 'open Bitcoin mining system,' says founder Jack Dorsey https://www.engadget.com/jack-dorseys-block-is-officially-building-an-open-bitcoin-mining-system-114033482.html?src=rss Block is officially building an x open Bitcoin mining system x says founder Jack DorseyBlock founder Jack Dorsey has announced on Twitter that the company is officially building an open bitcoin mining system Dorsey first announced in October last year that the digital payments provider then known as Square was considering working on the project even before it rebranded itself If you ll recall Square changed its name to Block to tie its services together and to better represent the future of its business in cryptocurrencies and blockchain technologies nbsp We re officially building an open bitcoin mining system ーjack️ jack January Now Block s general manager for hardware Templeton Thomas has revealed more details on the company s initial discussions regarding the project On Twitter Thomas said that Block aims to quot make mining more distributed and efficient in every way from buying to set up to maintenance to mining quot As such Block has identified the pain points and the technical challenges of the process starting with availability since rigs are hard to find and and are expensive Block has to find a way to make them more accessible to be able to meet its objective nbsp The company also wants to build a reliable system that addresses current rigs usual issues with heat dissipation and dust Plus Block is looking into striking the right balance between performance and other factors such as making sure the rig is efficient while having low power consumption Thomas said Block is also thinking of which partners to consider for the project and has already started building out a core engineering team to working on solutions and answer for all its questions nbsp Dorsey is a big believer in cryptocurrency and even once said that he believes bitcoin will replace the dollar one day Block had invested heavily in cryptocurrency and reportedly holds bitcoins or around US million based on current value 2022-01-14 11:40:33
海外TECH Engadget Tesla now accepts Dogecoin payments for some of its merch https://www.engadget.com/tesla-begins-letting-customers-buy-some-of-its-merch-using-dogecoin-110819070.html?src=rss Tesla now accepts Dogecoin payments for some of its merchTesla is allowing customers to buy select merchandise items using Dogecoin according to the website and a tweet from CEO Elon Musk You can now pick up the Cyberwhistle for doge Giga Texas Belt Buckle for doge and the Cyberquad for Kids at doge or According to the store Dogecoin is now the only way to buy those items as a cash option is no longer showing nbsp Tesla merch buyable with DogecoinーElon Musk elonmusk January Musk has been interested in Dogecoin of late having discussed in May the potential quot efficiency quot of the cryptocurrency compared to Bitcoin Then in December he tweeted that the company would quot make some merch buyable with Doge amp see how it goes quot Following Musk s announcement today Dogecoin has gone up around percent over the last hours Tesla accepted Bitcoin as payment for its cars in February but halted the initiative less than two months later citing Bitcoin s environmental impact quot Cryptocurrency is a good idea on many levels but this cannot come at a great cost to the environment quot Musk said on Twitter at the time nbsp Dogecoin uses less power to mine mainly because it s worth less than Bitcoin Musk said last year that he was working with Dogecoin s devs to improve its efficiency though there s no clear way yet to do that without decreasing its value That said Block s CEO Jack Dorsey just announced plans to build an open Bitcoin mining system that makes that particular cryptocurrency quot more distributed and efficient quot nbsp nbsp 2022-01-14 11:08:19
海外TECH CodeProject Latest Articles ColoredText - How to print colored text using Java https://www.codeproject.com/Tips/5322537/ColoredText-How-to-print-colored-text-using-Java console 2022-01-14 11:49:00
海外TECH CodeProject Latest Articles Web Search Engine https://www.codeproject.com/Articles/5319612/Web-Search-Engine mining 2022-01-14 11:13:00
金融 金融庁ホームページ 「違法な金融業者に関する情報について」を更新しました。 https://www.fsa.go.jp/ordinary/chuui/index.html Detail Nothing 2022-01-14 12:00:00
ニュース BBC News - Home Novak Djokovic: Australia cancels tennis star's visa https://www.bbc.co.uk/news/world-australia-59991762?at_medium=RSS&at_campaign=KARANGA health 2022-01-14 11:29:13
ニュース BBC News - Home Lockdown parties in No 10 on eve of Prince Philip's funeral https://www.bbc.co.uk/news/uk-politics-59989946?at_medium=RSS&at_campaign=KARANGA boris 2022-01-14 11:23:25
ニュース BBC News - Home Prince Andrew accuser welcomes decision to let legal case continue https://www.bbc.co.uk/news/uk-59991749?at_medium=RSS&at_campaign=KARANGA giuffre 2022-01-14 11:01:56
ニュース BBC News - Home Harry Dunn crash: Anne Sacoolas UK court date postponed https://www.bbc.co.uk/news/uk-england-northamptonshire-59996219?at_medium=RSS&at_campaign=KARANGA harry 2022-01-14 11:53:51
ニュース BBC News - Home Channel migrants: Thirty rescued as man dies off French coast https://www.bbc.co.uk/news/world-europe-59992918?at_medium=RSS&at_campaign=KARANGA migrant 2022-01-14 11:43:42
ニュース BBC News - Home UK economy above pre-Covid levels in November https://www.bbc.co.uk/news/business-59991870?at_medium=RSS&at_campaign=KARANGA figures 2022-01-14 11:54:11
ニュース BBC News - Home Milton Keynes couple Ron and Joyce Bond celebrate 81-year marriage https://www.bbc.co.uk/news/uk-england-beds-bucks-herts-59979000?at_medium=RSS&at_campaign=KARANGA marriage 2022-01-14 11:31:50
ニュース BBC News - Home Britney Spears and sister Jamie Lynn's rift grows with social media feud https://www.bbc.co.uk/news/entertainment-arts-59993346?at_medium=RSS&at_campaign=KARANGA relationship 2022-01-14 11:45:45
ニュース BBC News - Home 'Not great for tennis, not great for Novak' - reaction to Djokovic visa saga https://www.bbc.co.uk/sport/tennis/59992976?at_medium=RSS&at_campaign=KARANGA x Not great for tennis not great for Novak x reaction to Djokovic visa sagaAndy Murray described Novak Djokovic s visa saga as not great for tennis not great for the Australian Open not great for Novak 2022-01-14 11:46:58
ニュース BBC News - Home Head century punishes sloppy England in final Ashes Test https://www.bbc.co.uk/sport/cricket/59945361?at_medium=RSS&at_campaign=KARANGA hobart 2022-01-14 11:33:49
ニュース BBC News - Home Burnley game with Leicester game postponed because of Covid-19 and injuries https://www.bbc.co.uk/sport/football/59995287?at_medium=RSS&at_campaign=KARANGA Burnley game with Leicester game postponed because of Covid and injuriesBurnley s game at home against Leicester City on Saturday is postponed because of Covid cases and injuries within the Turf Moor side s camp 2022-01-14 11:35:41
ニュース BBC News - Home Downing Street parties: What Covid rules were broken? https://www.bbc.co.uk/news/uk-politics-59577129?at_medium=RSS&at_campaign=KARANGA drinks 2022-01-14 11:14:14
北海道 北海道新聞 北朝鮮、また弾道ミサイルか 今年3回目 米制裁拡大に反発か https://www.hokkaido-np.co.jp/article/633539/ 参謀本部 2022-01-14 20:20:04
北海道 北海道新聞 政界から海部元首相悼む声 二階氏「さわやかな弁舌」 https://www.hokkaido-np.co.jp/article/633553/ 海部俊樹 2022-01-14 20:13:00
北海道 北海道新聞 バイデン政権、オミクロン株に四苦八苦 最高裁は企業などへの義務化認めず https://www.hokkaido-np.co.jp/article/633552/ 四苦八苦 2022-01-14 20:12:00
北海道 北海道新聞 基礎的収支黒字化、26年度に前倒し 目標25年度は堅持 諮問会議 https://www.hokkaido-np.co.jp/article/633551/ 経済財政諮問会議 2022-01-14 20:11:00
北海道 北海道新聞 15日から共通テスト 各大学「余裕を持った行動を」 https://www.hokkaido-np.co.jp/article/633550/ 大学入学共通テスト 2022-01-14 20:05:00
海外TECH reddit やよいがやよいとコラボ https://www.reddit.com/r/newsokunomoral/comments/s3pt5i/やよいがやよいとコラボ/ やよいがやよいとコラボ submitted by u vicksman to r newsokunomoral link comments 2022-01-14 11:04:51

コメント

このブログの人気の投稿

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

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

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