投稿時間:2023-04-10 15:19:20 RSSフィード2023-04-10 15:00 分まとめ(24件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
ROBOT ロボスタ ホッキョクグマやカバに大接近「空から!水の中から!バーチャル冒険隊」開催 VR映像で動物の生態をリアル体験 大阪メトロ https://robotstart.info/2023/04/10/osakametro-adera-tennouji-zoo.html 2023-04-10 05:24:19
IT ITmedia 総合記事一覧 [ITmedia News] Twitterのアイコンになった柴犬の飼い主「びっくり仰天」 https://www.itmedia.co.jp/news/articles/2304/10/news118.html itmedianewstwitter 2023-04-10 14:12:00
IT ITmedia 総合記事一覧 [ITmedia PC USER] サンワ、手書き感覚で使えるペン型デザインのBluetoothマウス https://www.itmedia.co.jp/pcuser/articles/2304/10/news115.html bluetooth 2023-04-10 14:04:00
TECH Techable(テッカブル) 先制攻撃のチャンスが増えるかも?あらゆる角度で美しい映像を再生する湾曲ゲーミングモニター https://techable.jp/archives/203059 asusjapan 2023-04-10 05:00:43
AWS AWS Japan Blog AWS Supply Chain の一般提供が開始されました — 可視性の向上と実用的なインサイトによるリスクの軽減とコストの削減 https://aws.amazon.com/jp/blogs/news/aws-supply-chain-now-generally-available-mitigate-risks-and-lower-costs-with-increased-visibility-and-actionable-insights/ awssupplychain 2023-04-10 05:56:31
python Pythonタグが付けられた新着投稿 - Qiita PythonでWebアプリケーションを簡単に作成するpywebIOについて https://qiita.com/ToshikiKawata/items/ed9cbba44eab2bb399b6 pywebio 2023-04-10 14:39:03
Program CodeZine 【公募セッションの締切迫る】若手デベロッパー向け技術カンファレンス「Developers Boost 2023」が7月1日に開催 http://codezine.jp/article/detail/17644 【公募セッションの締切迫る】若手デベロッパー向け技術カンファレンス「DevelopersBoost」が月日に開催翔泳社CodeZine編集部は、歳以下Uの若手エンジニアのための技術カンファレンス「DevelopersBoostUエンジニアの登竜門デブスト」を、月日に開催する。 2023-04-10 14:10:00
Git Gitタグが付けられた新着投稿 - Qiita Raspberry Pi 3+の設定(忘備録)その7 sambaで共有フォルダを作成し、ローカルネットワーク用のgitのリモートリポジトリを置く https://qiita.com/cafe-capitola/items/91e10926bfbe9cea61e0 raspberrypi 2023-04-10 14:55:47
技術ブログ Developers.IO S3 のライフサイクルルールで削除対象になったオブジェクトは、削除対象になった時点で課金対象から外れますか? https://dev.classmethod.jp/articles/tsnote-s3-lifecyclerule-billing-001/ 削除対象 2023-04-10 05:38:10
技術ブログ Developers.IO 既存のメール環境そのままで Cloudflare Area 1 を導入する 〜 Microsoft 365 ジャーナル機能編 https://dev.classmethod.jp/articles/cloudflare-area1-ms365-jounaling/ 調査報告 2023-04-10 05:36:29
海外TECH DEV Community A step-by-step guide on Excel Add-in development using React.js https://dev.to/ifourtechnolab/a-step-by-step-guide-on-excel-add-in-development-using-reactjs-d64 A step by step guide on Excel Add in development using React js What is an Excel Add in MS Excel Add in is a kind of program or a utility that lets you perform fundamental processes more quickly It does this by integrating new features into the excel application that boosts its basic capabilities on various platforms like Windows Mac amp Web The Excel Add in as part of the Office platform allows you to modify and speed up your business processes Office Add ins are well known for their centralized deployment cross platform compatibility and AppSource distribution It enables developers to leverage web technologies including HTML CSS and JavaScript More importantly it provides the framework and the JavaScript library Office js for constructing Excel Add ins In this tutorial we will walk through the basic yet effective process of creating the Excel Addin using ReactJS Prerequisites for setting up your development environmentBefore you start creating Excel Add ins make sure you have these prerequisites installed on your PC NPMNode jsVisual StudioA Microsoft account with a subscription Looking for the best Excel Add in development company Connect us now How to build Excel Add in using ReactTo begin configure and install the Yeoman and Yeoman generator for Office Add in development npm install g yo generator officeNow run the following yo command to create an Add inyo officeAfter running the above command select the Project type as a React framework Take a look at the reference image below After selecting the project choose TypeScript as your script type Now name your Excel Add in project as shown below You can give whatever name you like but giving a project relevant name would be an ideal move Read More React Element vs Component A deep dive into differencesBecause it is critical to provide support for the office application choose Excel as the Office client Congratulations Your first Excel Add in is created successfully How to run Excel Add in Add ins are not instantly accessible in Excel by default We must activate them before we may use them Let s have a look at how to use a command prompt to execute Add ins in MS Excel Use the following command and open the project folder on the command prompt cd Excel TutorialNow start the dev server as shown below npm run dev serverTo test Add in in your Excel run the following command in the project s root directory npm startWhen you complete running this command you should see a task pane added to Excel that operates like an Excel Add in How to create a Table using ReactJS Businesses commonly use tables to present their business data whether it be price comparison financial comparison etc React js makes it simple and quick for organizations to manage large amounts of data Let s understand the process of creating a table using React js To begin Planning to hire dedicated ReactJS developers Contact us now Open the project in VS codeOpen the file which is located in src taskpane components app tsxRemove the componentDidMount method and click method from app tsxRemove all tags which are inside the return method and add one button inside the return method to generate a table App tsximport as React from react import Progress from Progress export interface AppProps title string isOfficeInitialized boolean export default class App extends React Component lt appprops gt constructor props context super props context this state listItems render const title isOfficeInitialized this props if isOfficeInitialized return return lt gt lt button gt Generate Table lt button gt lt appprops gt Create one event handler function for the button which will contain the logic for creating a new table lt appprops gt lt button onclick this handleCreateTable gt Generate Table lt button gt lt appprops gt Excel js business logic will be added to the handleCreateTable function that is passed to Excel run method The context sync method sends all pending commands which are in queue to Excel for execution The Excel run method is followed by the catch block handleCreateTable async gt await Excel run async context gt logic for create table await context sync catch err gt console log Error err In Excel run method first we have to get the current worksheet and to do so use the following method const currentWorksheet context workbook worksheets getActiveWorksheet Once we get the worksheet we ll create a table Use the following method to create a table const salaryTable currentWorksheet tables add A D true The table is generated by using the add function on the table collection of the current worksheet The method accepts the first parameter as a range of the top row of the table We can also give a name to our table as shown below salaryTable name SalaryTable Now add a header row using the code shown below salaryTable getHeaderRowRange values Name Occupation Age Salary The table s rows are then inserted using the add function of the table s row collection We may add several rows in a single request by sending an array of cell values within the parent array salaryTable rows add null add at the end Poojan Software Developer Meera Fashion Designer Smit Teacher Kashyap Scientist Neha Teacher Jay DevOps Developer We can change the format of salary to decimal For that we have to pass the column zero based index to the getItemAt method salaryTable columns getItemAt getRange numberFormat When we use the table to represent business data it is important to ensure content is displayed clearly With the fine use of the autofitColumns and autofitRows methods we can perfectly fit the content into cells salaryTable getRange format autofitColumns salaryTable getRange format autofitRows Read More Flutter vs React Native Choose the Best for your App in Let s take a look at how the entire function appears to be handleCreateTable async gt await Excel run async context gt const currentWorksheet context workbook worksheets getActiveWorksheet const salaryTable currentWorksheet tables add A D true salaryTable name SalaryTable salaryTable getHeaderRowRange values Name Occupation Age Salary salaryTable rows add null add at the end Poojan Software Developer Meera Fashion Designer Smit Teacher Kashyap Scientist Neha Teacher Jay DevOps Developer salaryTable columns getItemAt getRange numberFormat salaryTable getRange format autofitColumns salaryTable getRange format autofitRows await context sync catch err gt console log Error err Now use the npm start command to run the code That s all there is to it now when the user hits the generate table button he ll see the following result Output How to Filter data in a table Filtering data is critical because organizations utilize it to exclude undesired results for analysis Let s see how data in a table may be filtered for better analysis lt button gt Filter Data lt button gt lt button onclick this filterData gt Filter Data lt button gt Open the file which is located in src taskpane components app tsxAdd a new button for filter data below Generate Table button Create one event handler function for the button that will contain the filter data logic filterData function filterData async gt await Excel run async context gt await context sync catch err gt console log Error err Then we will get the current worksheet and table const currentWorksheet context workbook worksheets getActiveWorksheet const salaryTable currentWorksheet tables getItem salaryTable To begin filtering data we must first access the column from which we will be filtering data const occupationFilter salaryTable columns getItem Occupation filter Here Occupation is the column name on which we want to apply the filter Next pass the values as a filter query occupationFilter applyValuesFilter Software Developer Teacher Meanwhile take a look at how the whole function looks like filterData async gt await Excel run async context gt const currentWorksheet context workbook worksheets getActiveWorksheet const salaryTable currentWorksheet tables getItem salaryTable const occupationFilter salaryTable columns getItem Occupation filter occupationFilter applyValuesFilter Software Developer Teacher await context sync catch err gt console log Error err Finally run the code using the npm start command Now when the user clicks on the filter data button he ll see the following result Output How to sort data in the table Data sorting is also important since it helps to obtain well organized data in a sequential manner Let s understand in simple ways how data can be sorted in a table To start with lt button gt Sort Data lt button gt Searching for the best Microsoft development solutions Your search ends here lt button onclick this sortData gt Sort Data lt button gt Open the project in VS codeOpen the file from the path src taskpane components app tsxAdd a new button for sorting data below the filter data button Create one event handler function for the button which will contain the logic for sorting the data sortData function sortData async gt await Excel run async context gt await context sync catch err gt console log Error err Let s start by getting the current worksheet and table const currentWorksheet context workbook worksheets getActiveWorksheet const salaryTable currentWorksheet tables getItem salaryTable In the function we will build a sort field object and supply two parameters to it the key and the type of sorting ascending or descending Note The key property is the zero based index of the column and it is used for sorting All the rows of data are sorted according to key const sortFields key ascending false Subsequently we use the sort and apply method on the table and pass the sortFields object salaryTable sort apply sortFields Read More Comparative Analysis of Blazor Angular React Vue and Node for Web developmentHere is what the whole function might look like lt lt gt sortData async gt await Excel run async context gt const currentWorksheet context workbook worksheets getActiveWorksheet const salaryTable currentWorksheet tables getItem salaryTable const sortFields key ascending false salaryTable sort apply sortFields await context sync catch err gt console log Error err Run the code using the npm start commandFinally run the code with the npm start command The user will see the following result every time he clicks on the sort data button output ConclusionOffice Add ins benefit businesses with faster operations and processes In Office Add ins you can use familiar technologies like HTML CSS amp JavaScript to create Outlook Excel Word and PowerPoint Add ins In this blog we learned how to create an Excel Addin with React library from scratch and how to create tables filter amp sort data in Excel using Excel Add in 2023-04-10 05:50:30
海外TECH DEV Community Ensuring Serverless Success: A Guide to Service Level Agreement (SLA) Definitions and Guidelines https://dev.to/aws-builders/ensuring-serverless-success-a-guide-to-service-level-agreement-sla-definitions-and-guidelines-3ckm Ensuring Serverless Success A Guide to Service Level Agreement SLA Definitions and GuidelinesLast month I was tasked with estimating my Serverless service SLA service level agreement At first I was not sure how to approach the task For all I knew SLA was a legally binding contract between a company and its customers regarding its services availability and predicted downtime over a year In addition if the company failed to uphold it it had to reimburse its customers This blog post is the fruit of my research and thought process In this blog post you will find my definitions guidelines and approach to understanding SLA SLI SLO RTO amp RTP and other related definitions in a Serverless service context including estimating a Serverless service availability In addition you will learn how to improve your RTO and reduce service downtime Disclaimer I m not a lawyer just an architect trying to make sense of everything so please consult your legal team before publishing an SLA This blog post was originally published on my website “Ran The Builder Table of ContentsDefinitionsService DisasterSLISLOSLAService LayersAvailability Zones Failover vs Region FailoverRTORPOPutting RTO amp RPO Into a Business Continuity ExampleHow to Estimate SLASLA Estimation ExampleHow to Improve Your RTO ーPreparing For DisasterCI CD PracticesCrisis RecoveryObservability amp Support Readiness DefinitionsLet s review some basic terms and definitions before estimating a sample Serverless service potential SLA Service DisasterBefore we can talk about service health or availability we need to understand what is a service disaster A service disaster is an event where the critical business use case of a service ceases to work for some time However it does not mean that the entire service is offline Think of a log viewing service The service is online you can log in but not view any logs Does that qualify as a service disaster I d argue that yes The critical business use case is that users can view logs and this flow is broken I can log in to the service but I cannot do anything On the other hand you might have a secondary business use case that ceases to work but might be less critical to the customer Sure it s an annoyance and a production issue However the customer can still use the service in this case so it might not get considered official “downtime To be clear your product and legal teams are the ones that defines these use casesIt s essential to understand them as they directly affect downtime Note different business use cases can have other availability requirements but in this guide I will focus on the simple use case where they all share one SLA definition SLIService level indicators SLI are the actual numbers measuring the health and availability of a system We will record each disaster downtime and calculate the service availability using the following formula Availability Uptime ÷ Uptime downtime For example A service was online for hours over a month and hours of downtime due to various disasters Availability ÷ Availability ÷ Availability Availability The organization strives to improve and get the SLI closer to the SLO SLOService level objective SLO is the organization s internal goal for keeping systems available and performing up to standard This percentage represents where the organization wants to be in terms of availability where it strives to be but currently IS NOT there It is usually higher than the SLI and SLA SLAA service level agreement SLA is A service level agreement SLA defines the level of service expected by a customer from a supplier laying out the metrics by which that service is measured and the remedies or penalties if any should the agreed on service levels not be achieved ーFor example AWS Code Deploy SLA AWS defines the compensation terms for when the contract is breached and the monthly service uptime percentage is below the SLA threshold What does mean though According to the SLA calculator translates to So if AWS CodeDeploy is down more than minutes and seconds in a single month we the customers get service credit back Nice If there has been a more significant downtime we get more credit back all the way to a full credit for SLA or less which is more than days of downtime in a single month Business ExampleYour service SLI has been for the past year translating to hours and minutes of downtime The SLI is based on actual service disaster downtime incidents On the other hand let s assume your internal availability goal SLO is which translates to about minutes of monthly downtime which is rather ambitious However you want to give yourself a little “head room ーso you define your SLA as availability Your SLI is above the SLA so customers are happy and there s room to improve to get to the ambitious SLO Service LayersA service has two layers that interest us in the context of availability Application layer ーBusiness code in our case is the Lambda handlers code Infrastructure layer ーServerless resources and configuration DynamoDB AppConfig configuration Step function state machine etc Availability Zones Failover vs Region FailoverAll services must not have a single point of failover You might have a global service where failover between regions is required for example If your service does not respond in us east you must route your customer to the fallback region us east as soon as possible Most Serverless services support multiple availability zones failover and automatic recovery out of the box Services such as DynamoDB and Aurora support the mechanism of the global table which enables an automatic region failover Serverless does make these aspects quite simple as long as you configure them correctly in your infrastructure as code configuration RTORTO helps to understand SLA service uptime percentage Lets define it The recovery time objective RTO stands for Recovery Time Objective and is a measure of how quickly after an outage an application must be available again In other words the RTO is the answer to the question “How much time did it take to recover after notification of business process disruption “ーdruva com Four Stages of Disaster Recovery HandlingA disaster can manifest itself in both service layers It can happen due to infrastructure resource misconfiguration or a bug in the Lambda function code Handling a disaster consists of several stages The duration of these stages makes for the service recovery time the RTO Time to first Response It takes the firefighter developer or support engineer to start handling the disaster from the beginning of the first alert or customer notification Time to find the cause the time it takes the firefighter developer or support engineer to find the root cause of the disaster Developers must review logs metrics and traces to figure out the issue Time to fix the time to deploy a bug fix revert previous commits or disable a feature flag These changes trigger a CI CD pipeline run to production Best case scenario a code revert is pushed and deployed on the last commit s which does not require further development of a bug fix Worst case scenario a developer writes new code and tests to fix the issue while the service is down translating to extra downtime Time to notify users that the service is back and running Many factors can impact the time developers spend in stages amp for example Code coverage percentage Service code complexity Service observability quality Service dependency on external services Team proficiency Team s readiness for disaster recovery i e backup scripts disaster handling training As you can see RTO can vary between several minutes to several hours or even days Stage numbers and have the most potential to cause extended downtime RTO of AWS Managed ServicesOn the other hand RTO of managed AWS services is the time that takes the infrastructure to Identify that one availability zone or region is down Route failover the user or service data to a different A Z or region In managed AWS services A Z failover and recovery are made automatically making the RTO speedy DynamoDB is an example for a managed AWS service that handles that for you As for regional failovers Route supports automatic DNS failover which can route to a different region if one region is down DynamoDB and Aurora s global tables mechanism are other examples of AWS managed services that automatically handle regional downtime for you thus making the RTO speedy How Do You “Guesstimate RTO I call it a guess you need years of SLI data to estimate the RTO accurately If that s not the case you need to make a calculated “guess while considering the four stages of disaster handling and the factors that impact them We will discuss how you can improve these factors and the RTO in the last part of this post RPOA recovery point objective RPO is the maximum length of time permitted that data can be restored from which may or may not mean data loss It is the age of the files or data in backup storage required to resume normal operations if a computer system or network failure occurs To more concisely define the difference RPO is the time from the last data backup until an incident occurred that may have caused data loss ーevolveip netRPO depends on database backup frequency If you use Serverless databases you are in luck They have best in class point in time recovery and backups mechanisms When appropriately configured the RPO can be down to minutes with DynamoDB point in time and Aurora backups Putting RTO amp RPO Into a Business Continuity ExampleIn our sample service a typical RTO is one hour the RPO is minutes and the last database backup occurred at PM At PM seconds before the next backup takes place a disaster occurs The RTO is one hour on average which was indeed the case in this disaster At PM after one hour of downtime the service is back online Our data loss in this case is minutes as the last backup occurred at PM How to Estimate SLAFollow these steps Define what counts as a disaster in your service Define the critical flows in the service and what infrastructure and application code are relevant to them Calculate your current service SLI according to past incidents data SLI foretells the future and helps assume how many incidents you will have in a year Estimate your service RTO Calculate yearly downtime in days Assume how many incidents per year you can expect and multiply it by the RTO you calculated in step Make sure to change it to a day unit SLA formula ー downtime days SLA where is days which translates to yearly service uptime SLA Estimation ExampleLet s estimate SLA for a Serverless orders service that enables customers to create and view orders of a product Let s follow the four steps of SLA estimation Critical business flow ーCreate new customer orders Viewing existing orders is not considered a vital flow Current SLI ー one past incident in production for about one hour RTO see estimation below We will use a safer approach and assume future incidents require the team to debug and fix the issue instead of a simple code revert Estimated two yearly incidents Yearly downtime gt RTO days of downtime over a year SLA SLA RTO GuestimationThe services infrastructure layer uses AWS Lambda Amazon API Gateway and Amazon DynamoDB The service code quality is high code coverage is around SLA of AWS service in use minimum GUARANTEED SLA We will guesstimate an RTO of hours which is days assuming future incidents take more time to investigate and debug than just a code revert that takes one hour While the sole past incident took one hour to resolve we understand it was the exception and not the norm It s better to be on the safe side rather than promising estimations your team will find hard to deliver in the future In the future when there are more past incident examples we can fine tune the RTO number to the actual incident average Note how the SLA is lower than our guaranteed AWS service SLA lt That makes sense as we can have an SLA that is either lower equal to the SLA of the AWS infrastructure and services we depend on but not higher Second note our SLI is higher than the SLA and we currently deliver better availability than promised to the customers How to Improve Your RTO ーPreparing For DisasterYou should accept that it is just a matter of time until something terrible happens You can t prepare for everything but you can have insurance policies and try to ready your team and service for many disasters Let s review some action items that can prepare your team for the worst thus decreasing the RTO improving availability and improving the potential SLA percentage CI CD Practices Canary Deployment for AWS Lambda FunctionsCanary deployment for AWS Lambda ーfor a production environment use canary deployments with automatic rollbacks at first sight of AWS Lambda error logs or triggered AWS CloudWatch alarms Canary deployments gradually shift traffic to your new AWS Lambda version and revert the shift at the first sight of errors One way to achieve that is to use AWS Code Deploy with AWS Lambda Read more about it here Canary Deployment for Lambda Dynamic ConfigurationCanary deployments are also relevant in the domain of dynamic application configuration Feature flags are a type of dynamic configuration and allow you quickly change the behavior of your AWS Lambda function One way to improve feature release confidence is to turn a feature on or off quickly Crisis Recovery BackupsBack up your data and customers data Enable hourly backups of your DynamoDB tables Aurora databases OpenSearch indexes or any other database entity It s better to be safe than sorry Some services like DynamoDB offer automatic backups and ease of restoration The more frequent backup you do the lower the RPO is The SOP standard operating procedure Have a support team Create clear processes to handle disasters Processes reduce RTO in case of a disaster Create a process for restoring production data from the backup Creating a backup is one thing but restoring from a backup when the clock is ticking and upset customers are at your doorstep is another You should create a well defined process to restore any database quickly and safely Develop the required scripts define the restoration process who runs it when how test it in non production environments and train your support staff to use it In addition you should Create a process for making ad hoc changes scripts fixes on the production account Sometimes you can t wait for a bug fix to deploy from the dev account to production and it can take too much time to go through all the CI CD pipeline stages Sometimes you need a quick audited and safe manner of changing production data Ensure it is audited requires extra approvals and does not break any regulations you are obligated to Practice running these scripts at least once per quarter Chaos engineeringExpect the unexpected Outages and server errors are going to happen even in Serverless You need to be prepared Use AWS Fault Injection Simulation to create chaos in your AWS account have your AWS API calls fail and see how your service behaves Try to design for failure as early as possible in your Serverless journey Observability amp Support ReadinessGood observability and logging practices will help developers resolve issues quicker and be notified of a looming incident before the disaster happens thus reducing the RTO Correlation IDIn my eyes the perfect debugging session is the one in that I can trace a single user activity across multiple services with just one id ーthe infamous correlation id value One way to achieve this experience is to inject a correlation id value into your service logs In addition you must pass this value to any following call to services via request event headers AWS SNS attributes HTTP headers etc See an example here with AWS Lambda Powertools Logger Observability DashboardsCreate AWS CloudWatch dashboards that provide a high level overview of your service status for your SRE team It should contain manageable error logs and service information so non developers can quickly pinpoint errors and their root cause Leave the complicated dashboards containing low level service CloudWatch metrics to the developer s dashboards Work closely with the SRE team add precise log messages describing service issues and create the dashboard Read more about observability and CloudWatch here AlertsDefine CloudWatch alerts on critical error logs or CloudWatch metrics that correlate to a severe service deficiency or denial of service These can include Lambda function crashes latency issues Lambda function timeouts DynamoDB errors Cognito login issues etc Each alarm needs to be investigated and mitigated quickly TrainingInvest time and effort in support training for developers and SREs Each dashboard error log or CloudWatch metric must have a predefined action for the SRE to take Include guidelines such as “If you see X and Y it probably means that Z is an issue follow these steps to mitigate Z Ensure the SREs understand the high level event driven architecture of the service so they can support it more efficiently Thank you Ronen Mintz for the review and feedback 2023-04-10 05:28:48
海外TECH DEV Community Building Real-time Web Applications with Blazor Server https://dev.to/bhavin9920/building-real-time-web-applications-with-blazor-server-4odo Building Real time Web Applications with Blazor ServerBlazor Server is a hot new technology in the NET world that allows developers to build interactive web applications using C instead of JavaScript One of the key benefits of Blazor Server is that it provides real time communication between the server and the client using SignalR a technology that enables bi directional communication between the client and the server In this post we ll take a look at how you can build real time web applications using Blazor Server First let s start by creating a new Blazor Server project in Visual Studio Once the project is created we need to add the SignalR package to our project To do this we can use the NuGet package manager or simply add the following line to our csproj file lt PackageReference Include Microsoft AspNetCore SignalR Core Version gt Next we need to create a SignalR hub that will handle incoming messages from the client In our Blazor Server project we can create a new class called ChatHub cs and add the following code using Microsoft AspNetCore SignalR using System Threading Tasks namespace BlazorServerApp Hubs public class ChatHub Hub public async Task SendMessage string user string message await Clients All SendAsync ReceiveMessage user message This hub defines a method called SendMessage that takes in two parameters a user and a message When a client sends a message to the server the hub will broadcast the message to all connected clients using the ReceiveMessage method Next we need to add the SignalR JavaScript library to our project To do this we can add the following line to our index html file lt script src framework blazor server js gt lt script gt lt script src lib microsoft signalr dist browser signalr min js gt lt script gt Now that we have everything set up we can add some UI to our Blazor Server app to allow users to send messages to the server In our Index razor file we can add the following code page inject IHubContext lt ChatHub gt ChatHubContext lt div gt lt input type text bind user placeholder Enter your name gt lt input type text bind message placeholder Enter your message gt lt button onclick Send gt Send lt button gt lt div gt lt ul gt foreach var chatMessage in chatMessages lt li gt chatMessage User chatMessage Message lt li gt lt ul gt code private string user private string message private List lt ChatMessage gt chatMessages new List lt ChatMessage gt public async Task Send await ChatHubContext Clients All SendAsync SendMessage user message chatMessages Add new ChatMessage User user Message message user message StateHasChanged private class ChatMessage public string User get set public string Message get set This code adds a simple UI to our app that allows users to enter their name and a message When the Send button is clicked we call the Send method which sends the user s name and message to the server using the ChatHubContext We also add the chat message to a list of chat messages and update the UI And that s it We ve built a real time web application using Blazor Server and SignalR With Blazor Server we can leverage the power of C and NET to build modern interactive web applications without having to learn JavaScript or a new front end framework Plus with SignalR we can easily add real time communication to our apps making them even more powerful But real time communication is just one of the many features that Blazor Server offers Blazor Server also provides a rich set of components that we can use to build complex UIs These components can be easily customized and reused throughout our app which can save us a lot of time and effort Another great feature of Blazor Server is its ability to seamlessly integrate with existing NET code Since Blazor Server runs on the server we can easily access databases APIs and other back end services from our Blazor Server app This makes it easy to build web applications that integrate with existing systems and services In conclusion Blazor Server is a powerful technology that allows us to build modern interactive web applications using C and NET With its real time communication capabilities rich set of components and seamless integration with existing NET code Blazor Server is quickly becoming the go to choice for NET developers who want to build modern web applications If you haven t tried it yet I highly recommend giving it a try 2023-04-10 05:14:50
医療系 医療介護 CBnews コロナ新規入院例、5-9歳で微増-重症者は減少傾向、感染研サーベイランス週報 https://www.cbnews.jp/news/entry/20230410141910 国立感染症研究所 2023-04-10 14:30:00
金融 RSS FILE - 日本証券業協会 公社債発行銘柄一覧 https://www.jsda.or.jp/shiryoshitsu/toukei/saiken_hakkou/youkou/ichiran.html 銘柄 2023-04-10 06:00:00
金融 ニッセイ基礎研究所 米国株式に投資するならどっち?~スポット投資ならETFがおすすめ~ https://www.nli-research.co.jp/topics_detail1/id=74473?site=nli 米国株式の株価指数に連動する投資信託の純資産総額の推移をみると、つみたてNISAが始まった年には億円に満たなかった【図表】。 2023-04-10 14:58:26
海外ニュース Japan Times latest articles Blue Jays edge Angels despite Shohei Ohtani’s home run against Yusei Kikuchi https://www.japantimes.co.jp/sports/2023/04/10/baseball/mlb/jays-edge-angels/ Blue Jays edge Angels despite Shohei Ohtani s home run against Yusei KikuchiIn a matchup between graduates of Iwate Prefecture s Hanamaki Higashi High School Ohtani hit his third home run of the season 2023-04-10 14:01:20
ニュース BBC News - Home Twitter: BBC objects to 'government funded media' label https://www.bbc.co.uk/news/entertainment-arts-65226481?at_medium=RSS&at_campaign=KARANGA outlets 2023-04-10 05:09:23
ニュース BBC News - Home Sir Keir Starmer: 'I stand by every word' says Labour leader on Rishi Sunak attack ad https://www.bbc.co.uk/news/uk-65228859?at_medium=RSS&at_campaign=KARANGA Sir Keir Starmer x I stand by every word x says Labour leader on Rishi Sunak attack adThe Labour leader is accusing Rishi Sunak and the government of failing on a number of law and order issues 2023-04-10 05:55:34
ニュース BBC News - Home China jails prominent legal activists Xu Zhiyong and Ding Jiaxi https://www.bbc.co.uk/news/world-asia-china-65229269?at_medium=RSS&at_campaign=KARANGA trial 2023-04-10 05:48:25
ニュース Newsweek 「どこから来たかが問題となるべきではない。どこに行きたいかが重要だ」元シリア難民が29歳でドイツ地方自治体のトップに https://www.newsweekjapan.jp/stories/world/2023/04/29-15.php アルシェブルの才能と政治への情熱を見抜いた上司が、同州オステルスハイム自治体長に立候補するよう説得した。 2023-04-10 14:47:09
IT 週刊アスキー おしゃれな場所&メニューでインスタ映え! ルミネ新宿、ルミネエスト新宿などでビアガーデンを展開 https://weekly.ascii.jp/elem/000/004/132/4132161/ 期間限定 2023-04-10 14:45:00
IT 週刊アスキー Twitter Blue広告半減機能ついに提供開始 https://weekly.ascii.jp/elem/000/004/132/4132180/ twitter 2023-04-10 14:45:00
IT 週刊アスキー 『トワツガイ』初のプレイヤーアンケートを実施! https://weekly.ascii.jp/elem/000/004/132/4132171/ 新作 2023-04-10 14:10:00

コメント

このブログの人気の投稿

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

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

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