Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
CSS:真ん中線を中心に 左右等間隔に配置する方法 |
https://teratail.com/questions/336943?rss=all
|
ltdivgt |
2021-05-07 04:16:19 |
golang |
Goタグが付けられた新着投稿 - Qiita |
Go言語におけるバリデーションモジュールの返却値の覚え書き |
https://qiita.com/belq/items/65cf2e23995870c0dd18
|
本当はgithubcomだけどgopkgin使えとエラーが出てるがVSCodeだと補完できずエラーになるvリファレンス概要チェックしたい構造体にバリデーションルールを書いたタグを付与するvalidatorインスタンスのStructメソッドに、チェックしたい構造体のインスタンスを渡す戻り値errorがリストに入ったinterface型で返ってくるので、validatorValidationErrors型にアサーションして使用する例えばAPIの返却値としてエラー内容を構造化してクライアントに返すためには、のvalidatorValidationErrors下のメソッドを使う必要があります。 |
2021-05-07 04:51:43 |
技術ブログ |
Developers.IO |
Amazon Connect で混雑中のアナウンスと音楽を何度かループさせた後に音声を流して電話を自動切断させる |
https://dev.classmethod.jp/articles/amazon-connect-tsnote-aws-connect-loop-and-hangup/
|
amazon |
2021-05-06 19:00:33 |
海外TECH |
Ars Technica |
World of WarCraft: Burning Crusade re-returns on June 1, requires “cloning” |
https://arstechnica.com/?p=1763224
|
burning |
2021-05-06 19:35:21 |
海外TECH |
Ars Technica |
Today’s best tech deals: New iPad Pro, Amazon devices, and more |
https://arstechnica.com/?p=1763057
|
games |
2021-05-06 19:09:09 |
海外TECH |
DEV Community |
Top 5 DEV Comments of the Past Week |
https://dev.to/devteam/top-5-dev-comments-of-the-past-week-5ej6
|
Top DEV Comments of the Past WeekThis is a weekly roundup of awesome DEV comments that you may have missed You are welcome and encouraged to boost posts and comments yourself using the bestofdev tag Having a lot of unfinished projects floating around can seem daunting but this is a great outlook and work ethic to have zedvas zedvas • Apr I usually have going simultaneously I read a great tip once that said when you get stuck bored of one project you can then procrastinate by working on the other That helps keep my mind fresh and inspired for when I go back to the original project Being a developer is not an easy path and imposter syndrome gets the better of us sometimes hseritt has an awesome mindset thanks for the boost Harlin Seritt • May •Edited on May You stop having impostor syndrome when you have the realization that everything you re doing and going through is actually perfect for where you are in life It can be your work or relationships or anything or finances It doesn t matter Everyone goes through the same Think about it like this you can t possibly know more than you actually know Sounds elementary but it s amazing that we humans believe we should know more than we do make more money than we do and be where we think we should be when right here is absolutely fine for this moment Enjoy this moment and life takes care of itself These are some really great wins devlorenz And following DevNews is a win DevLorenzo • Apr •Edited on Apr Finally I have time to participate One of my articles reached the TOP of the week for the second time in a row I wrote my first paid article I discovered that React can be really funPS I also followed DevNews if that count as a win It s Bug Smash time Good job on the find thomasbnt Have fun fixing the bugs we ve outlined in our repo for Bug Smash everyone Thomas Bnt • May And here it is I found a bug in the matrix This post on journeying into coding in Nigeria is a fantastic necessary read for any developer Thanks for helping create a great community with this comment dammyreginal dammyreginal • Apr Once I finished reading this I connected to it immediately Thanks for putting this out All we hear every other day is success stories of developers no one talks about their struggles Even family members feel you re wasting your time They whine as if its their time you re using Sometimes their encouragement is merely borne out of pity For buffing software Developers its really crazy Especially in a third world country like Nigeria All the factors mentioned above us very true However to add a little to it is the fact that most job out there request for senior devs Very little if any request for junior Developers which would have been a fine way of growing their career Me I m open for any opportunity that comes my way So if you know of any please hit me up I never studied computer science However my love for IT and curiosity led me to be here right now Started into IT with learning networking Cisco Then i learnt front end web designing from Shaw academy That was back in I have taught this for a while Then just some months back I dived into backend using nodejs and I m reallly loving the journey I would state again that if there s opportunity for junior devs I d be ready to take the plunge I need the experience as my present job has nothing to do with IT I teach Once again thanks opeyemi stephen for the write up That was really bold of you See you next week for more great comments |
2021-05-06 19:55:01 |
海外TECH |
DEV Community |
Monitoring Django apps |
https://dev.to/danihodovic/monitoring-django-apps-mal
|
Monitoring Django appsEvery once in a while people reach out to me for advice on how to monitor their Django sites How do you know when your site breaks How do you fix things before your users notice My answer it depends In this post I ll summarize the different monitoring methods I ve found and used for Django projects Some methods are language and platform agnostic they apply if you are writing Rails or Node code while others are specific to Django Crowdsourced monitoringThis is the simplest form of monitoring and the starter pack for every web developer Simply wait until an angry user to tweets you that your site is offline and fix the bugs as the complaints come in Pros cheap because it requires no work Cons humiliating and costly You might lose customers It s bad publicity If your boss finds out he might shout at you Crowdsourced monitoring is best suited for hobby projects and startups where uptime isn t important because your app isn t making money Instead of building monitoring tools you can invest time in building features Move fast and break things Built in Django error reportsDjango is packaged with a lot of clever stuff and one of the them is built in error reports When a user triggers a server error Django automatically emails the site admins and includes the traceback of the error and the request context In order to enable error reporting you need to set the admins that will receive the report Every user in the ADMINS setting in settings py will receive an email ADMINS Jose jose devops es Adin adin fix the site se You also need to configure an email server Given how difficult it is to configure your own server I usually use third party API s for this Mailgun and Sendgrid are cheap and easy to integrate I use django anymail as the email backend It hooks into Django and allows you to easily swap in and swap out different email providers That way you re provider agnostic and can avoid vendor lock in Did Sendgrid hike their prices Change three lines of code and use Amazon SES The full documentation on email reporting is here Since most people use Slack as a means of communication you can use the django slack package to send errors reports to Slack instead of email Alright so what do I think about Django s built in error reports Pros useful for tracking down individual errors and bugssuitable for all sizes of companiesCons It doesn t actually work if your app has crashed completely Djangoneeds to be running to send the error reports In that case you ll still getangry tweets from users Healthchecks are we alive OK so we probably need something outside of our app to check that our app is indeed alive In DevOps lingo this is called a healthcheck In simple terms an external program sends a request to your app asking it if it s alive and your app either responds OK ERROR or doesn t return a response at all If the program receives an ERROR or gets no response it triggers an alert phone call sms email telling you that you need to wake up and fix things The simplest way to implement this is to configure a health check at your root url If the root url is accessible by our health checking robot it s probably accessible by other users too Smarter health checkingA more sophisticated approach is to add a dedicated url for health checks When a request is sent to that url check all external services your app depends on This could be a check to your database cache or microservice The hard job has already been done by Kristian Oellegaard who built a health checking app for Django Install django health check at at the health url and configure it like so urlpatterns url r ht include health check urls INSTALLED APPS health check required health check db stock Django health checkers health check cache health check contrib celery requires celery Now you need a component which sends requests to your app on a regular interval and reports if your app is unresponsive There are two ways to go about this deploy a tool on your own servers or use a third party provider Because I m lazy and clever I outsource this job to a third party provider If you decide to host a tool yourself you ll have a recursive problem who monitors your monitoring tool Who watches the watchmen Luckily for us developers loves building tools for other developers So much that most of them are free Here is a list of common health check providers I use If you want something self hosted and you re using Prometheus the Blackbox exporter is the way to go StatusCake can be configured to send Slack reports when a site goes offline Pros Suitable for all project sizes It doesn t matter if you have a blog or if you re Amazon com It s good to know when you re site is down It s simple to integrate and cheap usually free to deploy Cons A health check is basic and won t tell you detailed information about how your app is performing It s usually a binary response of online or offline You won t know if every th request is too slow or if users are trigger errors on urls other than the health check url Specialized monitoring toolsAlright so I usually recommend this category if you re already making money The cost of your app being offline has to outweigh the time invested in learning and deploying specialized monitoring tools Most of these tools have a steep learning curve but pay dividends when you need powerful and detailed introspection They re useful if you want to answer questions like what percentage of our HTTP requests result in xx server errors what is the mean time our servers take to respond to a request what is the slowest middleware in our stack what model database table is updated the most is our database or our application layer the bottleneck for scaling There are both open source and closed source SaaS monitoring solutions It s a question of in house deployment and maintainance cost vs the cost of a subscription I lean towards open source tools because I m more experienced with them I like Prometheus and Grafana which take time to learn but are incredibly powerful The open source community around these tools is strong and there are plugins available for everything from Django to Bitcoin prices So how does it work Prometheus operates in a pull based model where it pulls metrics from applications Your Django app collects metrics in memory and exposes it over HTTP at the endpoint metrics Prometheus polls this endpoint on a regular interval and stores the exported data in it s database Grafana is used to visualize fancy graphs of the aggregated metrics Prometheus stores data in a custom format and provides it s own metrics SDK s Uriel Corfa has done the heavy lifting for us by writing an app which hooks into the Django middleware ORM and cache layer and automatically exposes metrics generalized metrics All you need to do is to install and configure django prometheus Out of the box it provides metrics for requests amp responses cache and database operations You can also add custom metrics to track anything you think is important such as user signups and new monthly subscriptions For example settings pyPROMETHEUS USER SIGNED UP Counter django users signed up The number of users that signed up in total views pyfrom django conf import settingsfrom django shortcuts import renderdef sign up view request settings PROMETHEUS USER SIGNED UP inc return render request welcome html Prometheus comes with it s own query language PromQL We could graph the user signups in Prometheus with the following query to find out how many users signed up in the last hours increase django users signed up total h Pros Gives you fine grained data on how your app is performing Covers almost all use cases except individual bug reports stacktraces Cons It takes time to learn deploy and maintain a complex monitoring stack If you re working on a hobby project or a small startups you re probably wasting your time deploying something like this Monitoring Celery tasksMost medium to large scale Django projects I ve worked on use Celery for processing background tasks Usually we offload tasks that are too slow to complete during a HTTP request response cycle For example generating invoices or reading data from slow third party API s tasks that are scheduled to run at a later time For example payment reminder emails Since Celery tasks are executed outside of the Django context we need to monitor Celery separately from Django I use Prometheus extensively so much so that I wrote my own exporter for Celery metrics I like to keep an eye on the following metrics in a dashboard the total tasks executed in the last hthe most common tasksthe tasks that fail the most success rate I send automated alerts on the following metrics when more than N tasks fail in the last minutes N depends on how criticala task is Sending an invoice very critical so alert me whenever thishappens Retrieve third party API data not very critical when all Celery workers are deadThe exporter comes with automatically generated alerts that I ve used in production for a few client sites You can find them under the mixin subdirectory |
2021-05-06 19:16:19 |
海外TECH |
DEV Community |
AzureFunBytes Episode 42 - Hybrid Cloud on @Azure with @ThomasMaurer |
https://dev.to/azure/azurefunbytes-episode-42-hybrid-cloud-on-azure-with-thomasmaurer-4679
|
AzureFunBytes Episode Hybrid Cloud on Azure with ThomasMaurerAzureFunBytes is a weekly opportunity to learn more about the fundamentals and foundations that make up Azure It s a chance for me to understand more about what people across the Azure organization do and how they do it Every week we get together at AM Pacific on Microsoft LearnTV and learn more about Azure This week my guest was Senior Cloud Advocate Thomas Maurer We dove into the world of hybrid cloud Not every application is born in the cloud but they can certainly interact with it A hybrid cloud is a type of cloud computing that combines on premises infrastructureーor a private cloudーwith a public cloud Hybrid clouds allow data and apps to move between the two environments Companies across the planet are making a decision to integrate their on prem solutions with cloud services such as Azure Rather than have the datacenter be the end of where a solution lives companies can integrate their network configure VPNs and use the various services with Azure to help extend their infrastructure Intro to Thomas Let s talk Hybrid Cloud Azure Arc Tagging your resources Policies for your servers Log collection from our resources Adding a server to Arc Visualizing our resourcesBy using Hybrid Azure cloud you re enabling your apps to have access to one of the largest global networks Maybe you need a faster connection to exist between your on prem solution and Azure ExpressRoute ExpressRoute lets you extend your on premises networks into the Microsoft cloud over a private connection with the help of a connectivity provider With ExpressRoute you can establish connections to Microsoft cloud services such as Microsoft Azure and Microsoft Microsoft uses BGP an industry standard dynamic routing protocol to exchange routes between your on premises network your instances in Azure and Microsoft public addresses We establish multiple BGP sessions with your network for different traffic profiles More details can be found in the ExpressRoute circuit and routing domains article Learn about Azure fundamentals with me Live stream is available on Twitch YouTube and LearnTV at am PT pm ET Thursday You can also find the recordings here as well AzureFunBytes on TwitchAzureFunBytes on YouTubeAzure DevOps YouTube ChannelFollow AzureFunBytes on TwitterUseful Docs Get in free Azure CreditMicrosoft Learn Introduction to Azure fundamentalsMicrosoft Learn Introduction to Azure hybrid cloud servicesHybrid and multicloud solutionsWhat is ExpressRoute Customers are using Azure Stack to unlock new hybrid cloud innovationCustom Data Sovereignty amp Data Gravity RequirementsWhat is Azure Private Link Connect an on premises network to Azure Azure StackAzure Arc overviewAzure Arc documentation What is Azure Arc enabled servers Azure Arc enabled data servicesConnect hybrid machines to Azure from Windows Admin CenterConnect hybrid machines to Azure from the Azure portalWhat is Azure Arc enabled Kubernetes Use tags to organize your Azure resources and management hierarchy ITOps Talk Blog How to add a server to Azure ArcAzure Arc JumpstartAzure Architecture Center Hybrid Solutions |
2021-05-06 19:13:30 |
Apple |
AppleInsider - Frontpage News |
Man sues Apple for iPhone 6 battery explosion caused by alleged defect |
https://appleinsider.com/articles/21/05/06/man-sues-apple-for-iphone-6-battery-explosion-caused-by-alleged-defect?utm_medium=rss
|
Man sues Apple for iPhone battery explosion caused by alleged defectA Texas man is seeking a class action suit against Apple for allegedly selling defective batteries and violating its warranty promises after his iPhone exploded in his face in Credit AppleThe lawsuit lodged Thursday in the U S District Court for the Eastern District of Texas claims that the iPhone s battery contains a defect which makes it unable to reliably perform its function It goes on to allege that the defect creates a danger of explosion and fire Read more |
2021-05-06 19:51:12 |
Apple |
AppleInsider - Frontpage News |
How to set up home cinema sound on Apple TV 4K, while you can still get HomePods |
https://appleinsider.com/articles/21/05/06/how-to-set-up-home-cinema-sound-on-apple-tv-4k-while-you-can-still-get-homepods?utm_medium=rss
|
How to set up home cinema sound on Apple TV K while you can still get HomePodsThe new Apple TV K comes with superb Dolby Atmos sound but the best way to hear it is through the discontinued HomePod Here s how to do it It would be best to put the HomePods You don t know how good something is until it s gone Still if you already have two HomePods or you can find two in stock anywhere you can use them to create a home cinema effect with your Apple TV K Read more |
2021-05-06 19:01:02 |
海外TECH |
Engadget |
'Animal Crossing' and 'StarCraft' join the Video Game Hall of Fame |
https://www.engadget.com/world-video-game-hall-of-fame-2021-inductees-193936184.html
|
x Animal Crossing x and x StarCraft x join the Video Game Hall of FameAfter narrowing down a list of finalists The Strong National Museum of Play has inducted four new titles to its World Video Game Hall of Fame |
2021-05-06 19:39:36 |
ニュース |
BBC News - Home |
Covid: Germany rejects US-backed proposal to waive vaccine patents |
https://www.bbc.co.uk/news/world-europe-57013096
|
economy |
2021-05-06 19:46:34 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
議論される緊急事態宣言の延長、4-6月期成長率の落ち込みを試算する - 政策・マーケットラボ |
https://diamond.jp/articles/-/270355
|
|
2021-05-07 04:57:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「日米韓外相会議」で垣間見えた、米国の北朝鮮政策とは - 元駐韓大使・武藤正敏の「韓国ウォッチ」 |
https://diamond.jp/articles/-/270361
|
外相会談 |
2021-05-07 04:47:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
中国人富裕層と交際した日本人女子大生はなぜ別れたのか、異なる日中の結婚観 - DOL特別レポート |
https://diamond.jp/articles/-/269407
|
女子大学生 |
2021-05-07 04:45:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「首都圏の住宅価格」が、公示地価は下落傾向でも上昇し続ける理由 - DOL特別レポート |
https://diamond.jp/articles/-/270285
|
浮き彫り |
2021-05-07 04:40:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
リモート営業の「トラブル回避」のために、絶対に行うべき事前準備とは - News&Analysis |
https://diamond.jp/articles/-/270284
|
newsampampanalysis |
2021-05-07 04:35:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
丸暗記不要!英単語をネイティブと同じ感覚で習得する方法とは - ニュース3面鏡 |
https://diamond.jp/articles/-/270086
|
丸暗記不要英単語をネイティブと同じ感覚で習得する方法とはニュース面鏡近年、学生だけでなく英語を学び直す大人が増えています。 |
2021-05-07 04:25:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
コロナ禍で「男の冷え性」増加中、誰でも簡単にできる解消法とは - News&Analysis |
https://diamond.jp/articles/-/268414
|
newsampampanalysis |
2021-05-07 04:20:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
エディー・ジョーンズが語るその半生が心を打つ理由 - エディー・ジョーンズ わが人生とラグビー |
https://diamond.jp/articles/-/270078
|
元日本代表 |
2021-05-07 04:17:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
パートナーに「お母さん」の役割を求めてしまう残念な現象 - フェミニストってわけじゃないけど、どこか感じる違和感について |
https://diamond.jp/articles/-/269935
|
特別公開 |
2021-05-07 04:15:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
バフェット氏に物申す、ESG巡り機関投資家が反旗 - WSJ発 |
https://diamond.jp/articles/-/270397
|
機関投資家 |
2021-05-07 04:12:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
初心者でもわかるExcelマクロ入門! メッセージのアイコンを変えてわかりやすくしよう - 4時間のエクセル仕事は20秒で終わる |
https://diamond.jp/articles/-/270282
|
初心者でもわかるExcelマクロ入門メッセージのアイコンを変えてわかりやすくしよう時間のエクセル仕事は秒で終わるエクセルマクロの学び方、使い方を徹底解説マクロを仕事で使うための、ポイントのみを押さえた省力的で効率的な学び方を伝授します。 |
2021-05-07 04:10:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
米のワクチン特許放棄、投資家は副反応に要注意 - WSJ発 |
https://diamond.jp/articles/-/270398
|
要注意 |
2021-05-07 04:06:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
入社1年目にも再雇用者にも響く 「仕事で一番大切なこと」 - だから、この本。 |
https://diamond.jp/articles/-/270012
|
|
2021-05-07 04:05:00 |
ビジネス |
東洋経済オンライン |
新幹線vsあずさ、どっちで行く?長野の鉄道事情 目指すは長野か松本か、地元私鉄も見逃せない | GoTo最前線 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/426656?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
東洋経済オンライン |
2021-05-07 04:30:00 |
コメント
コメントを投稿