ROBOT |
ロボスタ |
ソニー 世界初のロボットハンド技術を体験会で公開 花やケーキなど「なんでも優しくつかむマニピュレーター」の詳細レポート |
https://robotstart.info/2021/12/07/sony-grab-hand02.html
|
sonytechnologyday |
2021-12-07 11:36:24 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] 暗号資産関連事業4社、日本メタバース協会を設立 「メタバース先進国を目指す」 |
https://www.itmedia.co.jp/news/articles/2112/07/news157.html
|
itmedia |
2021-12-07 20:04:00 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
なぜ乱数のシード値は42なのか? |
https://qiita.com/ofutonton/items/8cb88b34375bf473e45e
|
シード値とはしかし、乱数を固定したい場合もある。 |
2021-12-07 20:57:25 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
live serverがオートリロードされない |
https://teratail.com/questions/372743?rss=all
|
liveserverがオートリロードされない前提・実現したいことVSnbspcodelivenbspserverでWebサイトを作っているのですが、変更がブラウザに反映されませんリロードすれば反映されます。 |
2021-12-07 20:57:10 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Unity rgidbodyについて |
https://teratail.com/questions/372742?rss=all
|
rigidbody |
2021-12-07 20:56:11 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
ネットワークポリシーサーバ(NPS)のコマンドに関して |
https://teratail.com/questions/372741?rss=all
|
ネットワークポリシーサーバNPSのコマンドに関して知りたいことネットワークポリシーサーバーの管理テンプレートをコマンドでexportしたいです。 |
2021-12-07 20:51:32 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
react-hook-formとyupを用いたDatePickerのバリデーション |
https://teratail.com/questions/372740?rss=all
|
reacthookformとyupを用いたDatePickerのバリデーション前提・実現したいこと現在ReactNextjsを使って、日付の入力フォームを作成しています。 |
2021-12-07 20:43:03 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
magentaのインストール時にエラーが出ます |
https://teratail.com/questions/372739?rss=all
|
|
2021-12-07 20:39:09 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
CUDA runtime implicit initialization on GPU:0 failed. Status: device kernel image is invalid |
https://teratail.com/questions/372738?rss=all
|
CUDAruntimeimplicitinitializationonGPUfailedStatusdevicekernelimageisinvalid前提・実現したいことubuntuNVIDIAnbspGeForcenbspRTXnbspcudacudnnnbsptensorflownbsptensorflowgpunbspnbspを使用していますfromnbsptensorflowpythonclientnbspimportnbspdevicelibdeviceliblistlocaldevicesこちらを実行しますと下記のエラーが発生してしまいます。 |
2021-12-07 20:30:04 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Laradockの複数プロジェクト間での通信について |
https://teratail.com/questions/372737?rss=all
|
Laradockの複数プロジェクト間での通信についてOSmacOSdockerdockernbspdesktoplaradockvLaladockを使用して複数のプロジェクトを立ち上げています。 |
2021-12-07 20:26:36 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
BeautifulSoupでHTTP Error 403 Forbiddenの情報を取りたい(Webスクレイピング) |
https://teratail.com/questions/372736?rss=all
|
BeautifulSoupでHTTPErrorForbiddenの情報を取りたいWebスクレイピング前提・実現したいことBeautifulSoupをつかって下記URLの価格情報をとろうとしていますが、HTMLのコードないに価格やホームページの情報が出てきません。 |
2021-12-07 20:25:21 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
自社から現場のPLCから出るログなどを確認したい |
https://teratail.com/questions/372735?rss=all
|
分からないことは、シーケンサPLCはEhernetユニットに接続して対応を行っているが、無線でも対応したいが可能なのかシーケンサは主に三菱とキーエンスを使用しています。 |
2021-12-07 20:20:44 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
多次元配列の検索方法 |
https://teratail.com/questions/372734?rss=all
|
|
2021-12-07 20:08:48 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
PythonのジェネレーターのStopIterationを直す方法 |
https://teratail.com/questions/372733?rss=all
|
PythonのジェネレーターのStopIterationを直す方法Pythonのジェネレーターで下記のようなエラーがでます。 |
2021-12-07 20:04:16 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
phpにてexec()でpythonを実行したいのですが表示されません。 |
https://teratail.com/questions/372732?rss=all
|
phpにてexecでpythonを実行したいのですが表示されません。 |
2021-12-07 20:03:37 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
RubyGems で ウエブフレームワーク を検索してみた 2021版 |
https://qiita.com/superrino130/items/aa6fb474c8c2ce410a53
|
RubyGemsでウエブフレームワークを検索してみた版はじめに前回の記事Qiitaから年以上が経過しています。 |
2021-12-07 20:20:51 |
Git |
Gitタグが付けられた新着投稿 - Qiita |
この数日で学んだGit Command |
https://qiita.com/ka25012/items/6194fac65dd7cfc7e1e4
|
|
2021-12-07 20:39:59 |
技術ブログ |
Developers.IO |
従業員体験という砂の中にある砂金。MTM とは? |
https://dev.classmethod.jp/articles/mtm/
|
砂金 |
2021-12-07 11:53:51 |
技術ブログ |
Developers.IO |
Amazon Athena Apache IcebergテーブルフォーマットによるACID Transactionを試してみました! |
https://dev.classmethod.jp/articles/20211207-amazon-athena-iceberg-preview/
|
acidtransaction |
2021-12-07 11:20:05 |
技術ブログ |
Developers.IO |
การส่งอีเมลด้วยเซิร์ฟเวอร์ SES ของ SMTP ผ่าน WordPress |
https://dev.classmethod.jp/articles/send-email-with-smtp-of-ses-on-wordpress/
|
การส่งอีเมลด้วยเซิร์ฟเวอร์SES ของSMTP ผ่านWordPressครั้งนี้ผมจะมาเขียนบทความเกี่ยวกับการส่งอีเมลด้วยเซิร์ฟเวอร์SES ของSMTP ผ่านWordPress สิ่งที่ต้องมีต้องทำ |
2021-12-07 11:05:26 |
海外TECH |
Ars Technica |
Microsoft seizes domains used by “highly sophisticated” hackers in China |
https://arstechnica.com/?p=1818425
|
hacker |
2021-12-07 11:15:42 |
海外TECH |
MakeUseOf |
C vs. Python: The Key Differences |
https://www.makeuseof.com/c-python-core-differences/
|
discover |
2021-12-07 11:15:31 |
海外TECH |
DEV Community |
10 Tips For Launching a Successful SVOD Service |
https://dev.to/hermoniversa/10-tips-for-launching-a-successful-svod-service-3ml
|
Tips For Launching a Successful SVOD ServiceSubscription Video on Demand is a rapidly growing industry for a variety of reasons It allows consumers to pay for only the content they want which is one of the primary reasons why audiences are neglecting cable and other traditional providers Moreover it provides businesses with a direct line of revenue from consumers without the need to consult with or sell to advertisers This has the added benefit of freeing users from troubling ad interruptions SVOD is an excellent solution for businesses that have a dedicated audience that is willing to pay Businesses that use SVOD make money by selling packaged content in monthly quarterly or annual subscriptions and charging their customers a recurring fee In this article we ll give you some good tips to help you launch your successful SVOD service Should you know what SVOD is first Subscription video on demand is called SVOD It allows users to pay a regular price for unlimited access to a huge library of audio and video content for the term of the subscription For a monthly annual pay subscription video on demand SVOD services provides access to a library of content which includes movies TV series and other original content SVOD services are often delivered via streaming which requires the use of an active internet connection Netflix and Amazon Prime Video are two major SVOD businesses that are market leaders SVOD Model SuccessA successful SVOD model will generally have the following features Automated operations suitable for managing customer accounts billing plans and other logistics product price and billing frequency which can grow exponentially as revenues scale Manually doing these activities is inefficient a mistake and time consuming Easy to understand customer terms and conditions simple communication ensuring that customer terms and conditions properly explain purchase information and cancelling options Customer retention is ensured by including customer support contact details Value proposition A major part of SVOD revenue success is the value proposition When buying a product or service customers must believe that they are getting better value for their money Quick payment methods payments should be as easy as possible This also applies to any additional measures that need customers to take further steps to activate recurring billing As a result of these additional options conversion rates are generally lower Larger Profit Margin SVOD delivers larger profit margins than other OTT video monetization options even with a limited number of users The following are some helpful tips for launching an SVOD business Prioritize both quantity and quality of contentStarting an SVOD service can be ideal for you if you have high quality content for online consumption Make sure though that you have a substantial library to offer Content from a variety of genres and categories should also be included Make sure that you have all the necessary equipmentAs a content provider you must ensure that your audience has access to new content regularly As a result you must be financially prepared to regularly acquire or provide new content Determine your specialityFinding your speciality also helps in the creation of your company s personal brand This includes a fantastic website an easy to use platform and high quality original content Your target audience will be attracted to your brand because of the type of material you give and how simple it is to get that content Find the best mix of monetization models The subscription model is the most simple and popular revenue strategy for SVOD You can however combine subscription transactional and ad supported revenue methods to create effectively bundled revenue plans Choose an appropriate mix and a hybrid revenue model that is most suited for your company and allows you to increase income with reduced expenses Evaluate the opponentExamine the content of your competition to see what they have to offer Keep a closer check on what they re buying or investing in when it comes to content This helps you to spot gaps in your content mix and fill them with expert content that you can charge a premium for Examine the revenue models of your competitors and design a pricing strategy to draw subscribers Compare and contrast your content mix with that of your competitors to avoid duplicating content The first mover always wins when there is a duplication Application of appropriate technologiesChoosing the correct technology is one of the most important components of creating a successful SVOD service It s not easy to set up a streaming service When creating an SVOD service it s necessary to consider the following factors CDN It basically speeds up the rendering of content by distributing it to multiple locations at the same time giving your consumers better coverage Including a CDN in your SVOD platform is a wise choice because your content will be displayed faster to your subscribers resulting in a better viewing experience DRM Digital Rights Management Having a DRM system protects your content against unauthorized reproduction This protects you from piracy while also ensuring a more consistent cash source PCI Compliance Make sure your platform complies with the PCI Security Standards Council It means the platform must meet the requirements for processing storing and securely transmitting payment credentials Support Live Streaming APIMake sure your SVOD service includes the option to integrate API with live streaming feeds for high traffic content like live sports or award shows Regularly you might want to make your content available via live streaming Cooking videos for example can be live streamed on a weekly basis This is an excellent method of promoting your subscription based business Decide on a price rangeOne of the most critical things to figure out before the launch is pricing Examine your competitors and see how much other SVOD providers charge If you re not sure how much to charge for your content offer a similar price to your competitors Most streaming services provide two or three subscription options monthly quarterly and annual Promote your contentUsing adverts to keep your audience engaged is an excellent method You should promote premium content and future content on your website to remind your viewers of their favourite shows The number of views for premium content will rise as a result of this Before the launch test everythingConducting a test to ensure that everything is working properly before launching your business online is a good idea Before submitting the apps to the store there are a number of things you should evaluate Check to see if All the videos are properly playingYou like the user interface The website and app have good performance To watch videos you can pay ConclusionSVOD is on the rise and shows no signs of slowing To launch a successful SVOD service you ll need to develop a strong brand that will connect with your target audience as well as an effective website with an appealing design and clear customer focused messaging To help you build a well known brand and launch a successful SVOD business use the tips listed above |
2021-12-07 11:46:05 |
海外TECH |
DEV Community |
I 👿 BRUTALLY 👿 review your crappy sites, first victim is Bhagya Mudgal! |
https://dev.to/inhuofficial/i-review-your-crappy-sites-first-victim-is-bhagya-mudgal-2cdn
|
I BRUTALLY review your crappy sites first victim is Bhagya Mudgal Oh dear I write these angry rants and people are actually silly enough to ask me to review their websites in the comments Strap in as I destroy a young developer s site with their permission of course They actually asked you to do this Yes how silly of them And they did it on one of my angry rants posts too so I knew they were up for punishment Bhagya Mudgal • Nov Can you review my Portfolio bhagyamudgal me InHuOfficial • Nov •Edited on Nov That very much depends do you want a review where I look at your site and give you a few pointers and tips to improve it Or do you want A REVIEW where I pick apart every tiny little thing that isn t absolutely perfect with the site and trash you to within an inch of your life making you wonder why you ever thought you wanted to become a developer same as this article anger is for fun Happy to do either if you are brave enough to go for the second option I will do a whole article on it but it will be brutal Bhagya Mudgal • Nov I want a genuine review so I am ok with nd option See I am not lying they volunteered to be shredded so here goes angry man rant mode full engaged Trigger warnings The anger is for fun but the article will be aggressive and there are likely to be swears If you are sensitive to either of those things then you should leave now First ImpressionsWhen I landed on I was greeted with a pleasing dark theme and a nice waving hand emoji Aww bless Bhagya you even have a picture of your handsome face which is great But you have fallen into that trap of copying shitty ideas from other developers Don t be so weak with your openings First the main heading Hi I am Bhagya Mudgal Talk about a weak opening Yes I know who you are your name is in the fucking URL Also I don t really care what you are called yet I have a problem and I want to know if you can fix it That is immediately followed by a typewriter effect telling me all of the things you are When did developers start thinking that they had to list different attributes to make themselves appear interesting Are we arrogant enough to think people care or it is even relevant Also do you really expect someone to sit there and wait seconds to read interesting factoids about you Ditch the typewriter effect only developers think it is good Finally let s talk about that nice picture of that beautiful face of yours in pride of place You look smart and professional which is great Unfortunately it looks like you are in the scope of a sniper due to the circular surround and the line across the background I added the red dot just to complete the effect What should you do Bhagya why are you doing this to yourself You were smart enough or is it stupid enough to ask for a review how can you not see how weak the first impression is if you just copy crappy developers who have no imagination Rethink this bit Ask yourself the key questions why did I build this site what is my goal what do I want people to do when I finally persuade them to click on my link and visit my site At the moment the answers are I don t know and look at a pretty animation Fuck that I can see you have just started freelancing that is fucking great So what do you want My guess is freelancing work But what work Who do you help Small businesses development companies looking for temps and sub contractors Do you do designs or do you build things from designs Answer those questions before anyone has chance to click that back button I am making this up obviously but something like I build high quality software and web experiences that drive customer engagement and improve salesFuck me you are the man I need where is the contact button No seriously where the fuck is the contact button Don t make me look for the next action If you want me to contact you then place a contact me link styled like a button right below the opening paragraph Or if you think I will need more information before making a decision then make the link lead to your projects page with the text See how I can help And for the love of God will you retake that picture or photoshop out the background line so you don t look like you are about to eat the wrong end of a cal armour piercing rifle round What the fuck is Butter CMS I was going to ask you why you were being a cheapskate and allowing advertising on your site Then I saw the price of butter CMS and realised you were actually smart Fuck me that is some expensive software that you really don t need for a brochure site a month a month if you don t want to part with in one go and pay annually for a page maximum website they want me to pay extra for page Fuck me I will build you a CMS for a month how is that for a deal Anyway this isn t a rant about Butter the point is a big fat advert in the corner of your site is very off putting Ditch that over priced CMS and take the time to find an open source alternative if you want stuff for free I mean you spend ages writing an article promoting it on social media someone likes what you have to say and finally visits your site excited that you might be able to help them They see the massive and out of place advert click it and go away from your site They get confused by Heroku and all manner of words they don t understand see the expensive prices of the CMS and go back to Google Visitors are hard to get don t give people a reason to click away ffs You fucking hurt me with your MarkupOh man you used an SVG as a button for the mobile menu Rather than cover all the ways you fucked up in detail I already have a rant perfect for your site They just won t learn ️ a button is a amp lt button amp gt Series Accessibility Rants InHuOfficial・May ・ min read ay webdev html discuss Go on read that shit before you continue Read it Good Now please for the love of God will you just use a lt button gt for a button It is right there in the name This means that people using assistive technology such as a screen reader when viewing your site on a mobile can still reach your navigation and enjoy your site But that isn t the worst of it You used lt button gt s for your navigation items themselves on desktop and mobile Buttons with hrefs It isn t even valid HTML These should be anchors lt a gt Here is a golden rule to remember what to use if the URL changes when you click something then it should be an lt a gt otherwise use a lt button gt Additionally the links to other pages should also be within a lt nav gt element as they are navigation the HTML spec peeps really outdid themselves making this element easy to remember Yet again this helps screen reader users as they can then navigate the page by regions and find the navigation easily Here is the Markup you should be using lt button class md hidden Other TailWind Attrocities aria controls main nav aria haspopup true aria expanded false gt Your SVG for the menu on mobile lt button gt lt nav id main nav class hidden md flex gt lt button class Arrrgghhh Tailwind mess gt Your SVG for closing the menu lt button gt lt ul gt lt li gt lt a class nav button href aria current page gt Home lt a gt lt li gt lt li gt lt a class nav button href about gt About lt a gt lt li gt lt li gt lt a class nav button href blog gt Blog lt a gt lt li gt lt li gt lt a class nav button href projects gt Projects lt a gt lt li gt lt li gt lt a class nav button href contact gt Contact lt a gt lt li gt lt nav gt Fucking simple to make things accessible isn t it First thing you will notice is I added aria current page to the current pages hyperlink Instead of disabling the navigation item for the current page you can just add this attribute to tell screen readers what page they are on What is even more cool is that you can use this for styling with nav button aria current page your styles Well you could have done if you hadn t used TailWind But there will be plenty of opportunity for me to slip in digs at TailWind throughout the article so I will leave that alone for now Now there are a load of weird attributes I added that you might not recognise Don t worry it isn t your fault that courses don t teach you about accessibility so it all looks scary Let me break it down for you aria controls main nav This associates the button with the navigation so that screen reader users know what this button is related to The main nav part is the id of the navigation and that is how we make the link aria haspopup true This lets screen reader users know that clicking this button will open some sort of modal window aria expanded false This attribute lets screen reader users know the current state of the modal popup that we associated earlier with aria controls It should start as aria expanded false as the menu isn t open However when the menu opens you need to change this to aria expanded true to let screen reader users know that the popup is now visible There are a couple of other things to note When I press the open button and the menu is displayed you should change the focus to land on your close button which I have changed to a button in the same way I did with the open button SVG accessibilityAlso with SVGs you need to provide a text alternative Basically at the moment your SVGs do not contain any text that a computer can use to announce what the image is about As we are using these images as the contents of buttons we need to give them a programatically determinable name so a screen reader user knows what the open and close buttons do Luckily SVGs have a way of adding accessible names built in this is the lt title gt element lt svg xmlns fill none viewBox stroke currentColor aria labelledby close title role img gt lt title id close title gt Close lt title gt lt path stroke linecap round stroke linejoin round stroke width d M L M l gt lt path gt lt svg gt You will notice how I added the lt title gt as the first element above any paths in your SVG Think of the lt title gt as an alt attribute on an image The only other thing to note is that I used aria labelledby and pointed that to the lt title gt This is just a way to make the SVG more robust for screen readers Finally I added role img This tells the browser to treat this SVG like an lt img gt element and is just another thing we have to do to make it more robust I know that is a lot to take in but as long as you remember to add role img to the SVG element add a lt title gt element with a suitable description give the lt title gt element a unique ID use aria labelledby to point to that ID you will be fine even if you don t understand the exactly why at this stage Finally you should also trap focus within the menu but that is complicated and something for another day especially as this is a mobile menu so it is less relevant A new sin Here is one I haven t covered before in any of my writing You put a lt button gt in an lt a gt on your projects page What on Earth is that about Your poor browser will be screaming Ok did he click the button or the anchor What should I do Should I fire both or just one Who am I What day is it Why did you do this too me why your poor browserAs an added side effect of this atrocity it means that when tabbing through the page every single linkbutton a new term you invented a new shitty element has tab stops As each card has linkbuttons within it you have added so many additional tab stops that I got fucking Repetitive Strain Injury RSI reviewing your crappy site Never nest interactive elements well almost never but that is a long and nuanced conversation Ditch the lt button gt inner container in favour of a lt div gt as the outer anchor lt a gt is the right element to use here Contact PageYou added labels to your form You even put them in the right place just above the relevant input and aligned to the left I was starting to forgive you for the button fiasco and my heart rate had dropped below Beats Per Minute BPM finally Then I noticed that you didn t associate the label with an input ️Are you trying to give me a fucking heart attack My heart s BPM is back over now Web Development You need to give your inputs IDs Then on the relevant label you add for IdOfRelevantInput Really fucking easy lt div class flex flex col my gt lt label for nameInput class TailWind Bullshit gt Name lt label gt lt input id nameInput name name type text class More TailWind Bullshit placeholder Enter Your Name value gt lt div gt What this does is make sure that a browser can tell a screen reader this input is linked to this label so please say Name to describe this field Oh and by doing that you will be able to click on the label to focus the input as well as the input itself which is really handy if you are someone with accuracy dexterity problems i e someone with Parkinson s Disease or Cerebral Palsy There are other problems like the fact that the error messages are not linked to the input your inputs don t indicate they are invalid etc etc but let s start with the basics and link the inputs together first I can help you with that stuff later or you can read up on making forms accessible Oh and just a heads up a certain angry accessibility guy not too far from here is going to release a monster article on forms in the next weeks so you may want to keep an eye out for that as it will probably cover all the bits you need to know and more besides About PageYes I know I am not going in order tough shit I like making you have to think Now being really brutal you have to ask Is the about page actually relevant Well yet again I do not know the goal of the site If you are looking for love then you are certainly on the right track as this would make an excellent dating profile But if you are looking for work or looking to get more readers etc then you need to cut the crap that doesn t matter I like to ask myself the following question when writing copy Does this tell the person reading it one of the benefits of using my services reading my stuff etc In this instance I will offer two variations You want more readers I am a student in New Delhi with a passion for writing I like to write about the MERN stack due to my extensive experience using it in personal projects for client work and in open source projects I also like to write about my journey and experiences when learning to use new technologies as I believe this may be useful to others If this is the sort of thing you like to read about then why not connect with me I love making new friends in the developer community and seeing how we can help and learn from each other You want freelance work from other developers I am a college student by day and freelancer by night I have created several site clones and helped several clients bring their ideas to life You can check out some of my work here link to projects and add any client work you have done As a student I am able to offer a fresh perspective on common problems and utilise the latest technologies to help you achieve your end goals I am proficient with list of core items and can quickly pick up new frameworks if the need arises Hopefully you get the idea focus in on one thing There is a saying Jack of all trades master of none here in the UK It basically means you haven t learned how to do one thing well and so do lots of things to an average or poor level This leads me onto the massive list of technologies on the about page It isn t helpful it actually hurts you Do you know what people think when they see all of those icons What a talented young man who can do everything No I am fucking kidding they think yeah right a student who has worked with all of those technologies is going to know how to do hello world at best in each of them and won t be any use I have no doubt you can do more than hello world in each of those technologies but you should focus on the ones your are particularly strong on and show maybe key ones to people Also I would recommend changing them to be a list with the icon for the technology to the left and then the name of the technology and an example of your work with the technology if applicable This is due to the simple rule of don t make people think I was looking at those icons and it took me a few seconds to recognise some of them and I have been at this for years People have short attention spans and so they will only glance at the icons and then move on possibly missing the very technology that will trigger them to think ah Bhagya uses that and we need someone to do XXX and get you some work A final thought here is if you want work from small businesses you need to scrap this page entirely as it stands They do not care about tech stacks small business owners care about what pain points you can fix So if you are after work from small business owners focus on how you can bring them customers fix problems with their current sites help bring their next big idea to life etc Blogs Now we are talking some of your writing Now before I tear you a new one over your shitty code once again let me just say you write well and I enjoyed your articles Sorry I don t know what came over me back to the rant First the blog landing page lt h gt heading check A list of blog posts yeah but in a load of nested divs If something is a list use a fucking list Wrap your posts in a lt ul gt and make it easier for people using assistive tech as it will then announce the number of posts same principle as the navigation part I mentioned earlier Also your article headings are just styled to look like headings By adding a lt h gt to contain your headings instead of lt p class text gray text xl font medium mt mb break words gt lt p gt it means that people using a screen reader can also navigate by heading levels the most popular way to navigate a site It is also good for SEO Also do we really need the fucking click to read more in Meh minor point but I would ditch that Finally just as an observation but why have you got an author at the bottom of your posts They are all written by you what is the fucking point Are you thinking people are going to guest blog for you with your visitors a month Wait until you scale this blog up to be a monster then add the author info to the blog cards Now an actual postYet again it starts promising you used a lt h gt for the first heading honestly I shouldn t be fucking impressed by this but as so many sites fuck this up I suppose I better praise you Now onto the article headings and they are lt h gt s Why oh fucking why would you do that What made you think oh yeah start with a lt h gt and then skip to a lt h gt that makes sense Do you not like lt h gt s Are you hphobic Fix this shit don t skip heading levels The irony that one of your articles is called Signs that bad programmers have while skipping fucking heading levels is beyond funny thanks for the laugh The final thing to mention is the publication date This should be located within a lt time gt element This is just good practice When using the lt time gt element you should also set the datetime attribute on the element so that computers can understand the date you have entered So for example lt time datetime gt Sun Sep lt time gt Final thoughtsYou have made fewer mistakes than most senior developers so I suppose you deserve some praise for not being as shitty as everyone else Obviously there are still more things I haven t slated you for and I don t want to miss my chance These include Lack of lt main gt elementThe fact your site only scores on web dev measure but that is because you are using Client Side Rendering for a brochure site and that is just stupid Don t worry though you are certainly not alone in this and is respectable enough The fact you don t use prefers reduced motion detection or a way to switch off animations to make sure animations are reduced for people with vestibular disorders The lack of relevant WAI ARIA attributes on your contact form that I mentioned earlier using white text on a black background is just as fucking blinding as black text on a white background find a slightly softer palette ffs Yes I am complaining your site has too much contrast get over it As you can tell I could go on and on and on telling you how many things you fucked up but I feel like I have done enough damage for one day Hopefully I have succeeded in destroying your site as requested You re fucking welcome Being serious for a secondOk the angry man rants are switched off now I wanted to give my honest opinion I just want to say Bhagya the site is nice and simple and gets the point across well It may look like a long list but honestly you have done quite well The site is reasonably easy to use with a keyboard the colour contrast is pretty good the navigation is clear etc One thing that is hard to get across in angry rants is where the important fixes are The things that you should tackle first from an accessibility perspective are the labels not being associated with the inputsthe skipping heading levels problemthe nested misuse of buttons and links Fix those and the site becomes much more usable for people using a screen reader Oh and I am serious about that picture on the home page you look really smart but also really like you are about to be taken out due to the unfortunate line behind you Thanks for letting me unleash the angry man on your site it was fun and therapeutic If you have any questions just let me know and I will try and help point you to useful information on how to fix stuff Thanks for being my first victim and good luck with the BCA and freelancing Who s next Anyone else want their site ripping to shreds Step right up Oh and I have a super important post going out later today so stay tuned titled days to £million this should be fun so check that out please |
2021-12-07 11:41:01 |
海外TECH |
DEV Community |
Establishing Your Cloud Foundation on AWS | AWS White Paper Summary |
https://dev.to/awsmenacommunity/establishing-your-cloud-foundation-on-aws-aws-white-paper-summary-11pp
|
Establishing Your Cloud Foundation on AWS AWS White Paper Summary IntroductionThe increasing breadth and depth of cloud services makes the cloud a powerful enabler of efficiency agility and rapid innovation However building a foundational AWS Cloud environment requires decisions across multiple AWS and partner products services and solutions Customers are looking for guidance to help them set up and operate an environment that is compatible with their IT practices and enables their builders and operators while adhering to governance requirements This whitepaper introduces a guided path approach to help customers build and evolve their AWS Cloud environment based on a consolidated set of definitions use cases guidance and automations The approach includes people process and technology considerations of establishing an AWS Cloud environment The primary business drivers behind moving to the cloud include greater agility innovation and scale When planning a cloud adoption strategy the number of decisions that you need to make to stand up a production ready cloud environment is significant Decisions that are made early on can affect your ability to enhance and or scale your environment in the future This complexity has led customers to look for prescriptive guidance across the range of AWS services that can be used to create a foundational environment Establishing a cloud foundation on AWS requires guidance tailored to your business needs Using a capability based approach you can create an environment to deploy operate and govern your workloads You can also enhance the capabilities to extend your environment as your requirements evolve and you deploy additional workloads to the cloud Building a foundational environment on AWS can be done with a standard prescriptive set of capabilities across different functional areas These capabilities can be used as a structured way to quickly build or expand your AWS Cloud environment and include use case scenarios and corresponding guidance You can adopt and implement capabilities according to your operational and governance needs As your business requirements mature the capability based approach can be used as a mechanism to verify that your cloud environment is ready to support your workloads and scale as needed This approach enables you to confidently establish your cloud environment for your builders and your business CapabilitiesTo support cloud adoption AWS recommends that you have a foundational set of capabilities that enable you to deploy operate and govern your workloads A capability includes a definition use case scenarios opinionated guidance and supporting automation to establish and operate a specific part of a cloud environment Capabilities are components that can help you plan implement and operate your cloud environment and include people process and technology considerations Capabilities are designed to integrate into your overall technology environment In addition to technology implementation guidance capabilities include operational guidance for instance notifications event handling and remediation as well as team resource skills and processes needed to stand up and operate each capability AWS has defined a set of capabilities to help you establish a cloud foundation One way to categorize these capabilities is by functional areas which can help you identify accountable owners and stakeholders in the development operations and governance of capabilities Each capability includes stages of maturity that enable you to implement based on where you are in your cloud journey including your governance and operational requirements As your cloud environment grows and matures the capabilities can be enhanced to meet your new requirements Capabilities definitionsThis section includes high level definitions for each foundational capability organized by their primary functional area SecuritySecurity functional area capabilities include Identity Management amp Access Control enables your teams to efficiently build and centrally manage the access to your cloud platform environment The capability enables you to structure your organization organize your accounts and set up access to your environment based on a least privilege model Log Storage enables you to securely collect and store environment logs centrally within tamper resistant storage This capability enables you to later evaluate monitor alert and audit access and actions performed on your AWS resources and events Data Isolation enables you to limit access to data at rest and in transit so that data is only accessible to appropriate authorized entities This capability also includes the ability to detect misuse and or unauthorized access leak and theft of data Encryption and Key Management refers to the ability to centrally manage encryption keys for different workloads and the ability to encrypt data at rest and in transit Access to keys is provided based on least privilege and usage is monitored to report any anomalies This capability also includes different patterns of rotation based on requirements Secrets Management applies to managing secrets access credentials such as passwords access keys other API keys X or SSH private keys This capability incudes storage access control access logging revocation and rotation aspects for managing secrets Security Incident Response enables you to respond to a security incident Based on decisions specified in policy the response involves characterizing the nature of the incident and making changes which may involve activities including restoration of operational status identification and remediation of root cause and gathering evidence pursuant to civil or criminal prosecution Forensics involve the analysis of log data and evidentially captured images of potentially compromised resources to determine whether a compromise occurred and if so how Outcomes of root cause analysis resulting from forensic investigations are typically used to produce and motivate the application of preventative measures Patching is the ability to deploy sets of changes to update fix and or enhance the operation and security properties of workloads This includes addressing security vulnerabilities bug fixes and other related work The scope of patching includes operating systems applications and any relevant software systems Vulnerability amp Threat Management is the ability to identify vulnerabilities that can affect the environment availability performance or security This capability enables you to assess the impact and scope e g blast radius of vulnerabilities and threats and address remediate them Workload Isolation Boundary enables you to create and manage isolated environments to contain your newly created or migrated workloads This approach reduces blast radius of vulnerabilities and threats and eases the complexity of compliance by providing mechanisms to isolate access to resources Central ITCentral IT functional area capabilities include Template Management is the ability to create and group reusable templates in a central repository to quickly deploy manage and update infrastructure schemas golden images and resources across the environment This capability includes the necessary processes to create test update and validate the templates when required These templates are pre approved implementation patterns using already approved and onboarded AWS services and are ready to be used by different teams based on requirements Tagging enables you to group sets of resources by assigning metadata to cloud resources for a variety of purposes These purposes include access control e g ABAC cost reporting and automation e g patching for select tagged instances Tagging can also be used to create new resource constructs for visibility or control e g grouping together resources that make up a microservice application or workload Tagging is fundamental to providing enterprise level visibility and control Metadata Sorting Searching is the ability to search and filter based on metadata applied to tagged resources within your environment These resources can be accounts or resources within these accounts Service Onboarding is the ability to review and approve AWS services for use based on consideration of internal compliance and regulatory requirements This capability includes risk assessment documentation implementation patterns and the change communication aspects of service consumption Records Management enables you to set retention of data according to your internal policies and regulatory requirements including how to transition data to archive before it is deleted This data can include financial records transactional data audit logs business records personally identifiable information PII or other data subject to retention policies Data De Identification is the ability to anonymize subsets of data and information as they are stored and processed to reduce their sensitivity for example national ID numbers trade data healthcare information and when required preserving the underlying data format This capability also includes the ability to tokenize data such as credit card numbers physical address health care records to reduce the need to access the underlying sensitive data Logging amp Monitoring is the ability to gather and aggregate security and operational data about system and application activities including near real time analysis of data to identify anomalies indicators of compromise performance issues and configuration changes Governance is the ability to implement executive board policies that your AWS Cloud environment must adhere to This policy includes the rules for your environment defines risks and informs alignment of internal policies As your cloud foundation matures a portion of this capability is embedded in all other capabilities to ensure adherence to governance requirements Audit amp Assessment is the gathering and organizing of documentary evidence to enable internal or independent assessment of your cloud environment and activities within it against standards including information about who accessed what when and from where and what changes happened This capability allows you to validate assertions that all changes were performed in accordance with policy and via appropriate workflow mechanisms Change Management enables you to deploy planned alterations to all configurable items that are in an environment within the defined scope such as production and test An approved change is an action which alters resource configuration that is implemented with a minimized and accepted risk to existing IT infrastructure OperationsOperations functional area capabilities include Support is the ability to troubleshoot an environment ask questions submit tickets integrate into existing ticketing systems and escalate issues to an appropriate entity for a timely response depending on criticality and support level Support may also require granting ability to access relevant resources to perform troubleshooting and remediation activities Rollout Rollback is the defined strategy to roll out application or configuration changes to the environment or roll back these changes in case of failure Application and configuration changes can include updated permissions new policies new or updated network configuration new version of the application or updated software development kits These configuration changes can also include modifications to the orchestration framework that deploy these changes Backup is the ability to make reliable copy of data in a reliable way for retrieval as needed to meet business and security goals Recovery Point Objective RPO and Recovery Time Objective RTO Content to be backed up includes orchestration framework data and configuration application data logs and customer data Disaster Recovery involves the use of automated mechanisms to resume processing of transactions hosted in one physical environment in a different physical environment in the event that the physical environment where the transactions were originally being processed becomes unexpectedly unavailable Software EngineeringSoftware Engineering functional area capabilities include Developer Experience amp Tools includes the tools and processes required for developers to build and deploy workloads easily to the cloud This capability spans from storing code to building workflows to promoting workloads from test to production environment Application Security encompasses the protection of application software and the detection of anomalous behavior in the context of the applications interactions with clients Threats to be addressed include unauthorized access privilege escalation and other application level threats typically characterized in threat frameworks NetworkNetwork functional area capabilities include Network Security enables you to design and implement security policies and controls across different levels of the networking stack to protect your resources from external or internal threats to ensure confidentiality availability integrity and usability This capability includes prevention detection and blocking of anomalous network traffic based on monitoring of ingress egress and lateral data movement Network Connectivity enables you to design build and manage a secure and highly available network cloud infrastructure This capability provides best practices and resources to automate network infrastructure build configuration and expansion FinanceFinance functional area capabilities include Cloud Financial Management provides the ability to manage and optimize your variable expense for cloud services This capability includes near real time visibility as well as cost and usage analysis to support decision making e g spend dashboards optimization spend limits chargeback anomaly detection and response This capability also includes budget and forecasting to enable you to have a defined cost optimized architecture for your workloads to select right pricing model attributing cost of resources to the relevant teams This enables you to track notify and apply cost optimization techniques across your environment and resources Expense information is centrally managed and consumed and access to critical stakeholders can be provided for targeted visibility and decision making Resource Inventory Management enables visibility and configuration of cloud based resources that make up an IT level service or workload Resources are tracked in the environment along with associated configurations via a system of record e g CMDB for ITSM managed environments to enable a larger IT level system of record for visibility and configuration management of all software hardware and firmware resources in the cloud environment Working with the capabilitiesEach organization s cloud adoption journey is unique To successfully build your cloud environment you need to understand your organization s current state the target state and the transition required to achieve the target state As you work on your plan to establish your environment capabilities can help you drive the conversation and decisions across relevant stakeholders identified by the functional areas for each capability The following graph shows a path that you can follow when planning your environment It s based on dependencies between capabilities and can be used to create a project plan for the implementation of capabilities in your environment In addition to the dependencies shown via the arrows some capabilities apply to the overall environment for example Governance and Audit amp Assessment Capability dependency guided path Next stepsIf you are still exploring the cloud AWS recommends that you deploy a few proof of concepts POCs to demonstrate business value to your stakeholders If you are ready to start building a cloud environment to host your workloads on the cloud this set of defined capabilities can help you build your foundational cloud environment Before getting started with your cloud adoption AWS recommends that you complete the following activities and reach out to your account team for more information Review the list of capabilities and create a timeline for implementing capabilities accounting for any dependencies Identify the stakeholders in your organization that are responsible for each capability Create an implementation plan and a timeline to build your cloud environment As your requirements change to help you grow your presence in the AWS Cloud you can use the defined capabilities to build your own approach using your own tools ConclusionThis whitepaper introduces a capability based approach to establishing the foundation for your AWS environment and helps you identify the relevant stakeholders needed to make important decisions along your journey The defined capabilities in this paper are based on current AWS best practices and the experience of thousands of customers that have built their foundational environment on the AWS Cloud ReferenceOriginal paper |
2021-12-07 11:37:20 |
海外TECH |
DEV Community |
How to Setup & Use Strapi to Store your app's logs |
https://dev.to/strapi/how-to-setup-use-strapi-to-store-your-apps-logs-50l8
|
How to Setup amp Use Strapi to Store your app x s logsIn most application scenarios a frontend application produces logs that need to be collected and managed centrally This is very helpful for being notified when an error occurs or for troubleshooting bugs The market offers many tools that centrally collect logs and let you manage them in a suitable container to support this process Unfortunately most of these services require paid subscriptions Moreover for a small project adding a layer like this can be overkill But what about using Strapi as a backend for logging management This way you will have your log integrated into your Strapi backend without any additional cost This article explains how to configure Strapi to act as a backend for collecting logging and showing them to the developers The result of this step to step guide is a replicable solution for ingesting logs from any frontend application and the javascript code for connecting So let s jump into the article OutlineIntroductionInstall StrapiConfigure the Strapi backendThe javascript libraryTest it on a javascript applicationConclusion PrerequisitesBefore you can jump into this content you need to have a basic understanding of the following Basic knowledge of JavaScriptDocker installedBasic understanding of Strapi get started here Download and install Node js Install StrapiThe first step before starting on the core of the tutorial is to install Strapi You can create an online account or install it locally For this tutorial it s equivalent We will embrace the local installation option for giving you a single repo with source code that can be activated and tested locally with ease link to the source code at the bottom of this article The first step is to create a file called docker compose yml and put this content inside version services strapi image strapi strapi environment DATABASE CLIENT postgres DATABASE NAME strapi DATABASE HOST postgres DATABASE PORT DATABASE USERNAME strapi DATABASE PASSWORD strapi volumes app srv app ports depends on postgres postgres image postgres environment POSTGRES DB strapi POSTGRES USER strapi POSTGRES PASSWORD strapi volumes data var lib postgresql dataThen you can type the following command and the environment will start docker compose upYou will get a confirmation that the application is running in the console Then you can navigate to http localhost admin Just fill the form with your data and click Let s start Inside the configuration panel we have to activate some plugins Just click on the Marketplace icon on the left menu Then you can activate the documentation plugin to test the APIs that we will create by clicking the Install button once you have done this the button text will change to Already installed Now Strapi is ready to be configured Let s continue to the next section Configure the Strapi backendIn this section we will see how to configure the Strapi backend for ingesting and storing logs Of course like a headless CMS Strapi can manage every kind of data We have to explain how they are made To do this we will create a new Content Type by clicking the left icon menu Content Types Builder Then we can create a new content type by clicking Create new collection type That we will call Logs like in the next image As you click Continue you will be allowed to add new fields to the content type The first field to add is the Message one which will store the log message We will store it in a Long text format because we may have huge messages The first step is to choose the right type of field like in the next image The next step is to set the field data by typing the name and the base settings like in the next image This is just one of the fields we need For this basic setup the list of fields are A message of type text the one already added in the previous step The eventDate that will contain the date of the logThe eventLevel that can be INFO DEBUG or ERRORA JSON field called data that will store some additional informationAfter adding all these fields the final result should be something like what you see in the next picture Another important step is configuring the view to show the most recent logs on top of the list This can be done easily by editing the view settings like in the next picture As you can see we can sort items by date or id descending Now we can add logs from the interface manually but this is not our applicative behavior We need an external system our frontend application to send logs by using APIs Because we have installed the Documentation plugin we can click on the Documentation item on the left menùand land on the documentation page Here we can find a JWT token that we can copy and use later on our app to authenticate web requests You can see it in the next picture Then by clicking on Open the documentation we will land to the Swagger UI We can find the Logs entity on the list and expand the section unveiling the Log s APIs like shown in the next picture Expanding the POST method we will see a payload prototype to send to the server to create a new log entry This payload is shown in the next image After this step the backend configuration is finished In this section we have seen how to configure the server side part of this tutorial and now it s time to move on to the client side and configure a sample application for sending logs The javascript librarySince we have the backend service set up we can start focusing on the client part Well this will be very easy and will take a few minutes All the logic can be implemented by overriding the standard console definition In the next snippet of code we can see the full implementation of the class var console function oldCons return apiToken url httpPost log var xmlhttp new XMLHttpRequest xmlhttp open POST this url xmlhttp setRequestHeader Content Type application json xmlhttp setRequestHeader Authorization Bearer this apiToken xmlhttp send JSON stringify log sendLog level input var data var message message input if input length gt input splice data input var log message message eventDate new Date eventLevel level data data this httpPost log return log log function text var log this sendLog DEBUG text oldCons info log info function text var log this sendLog INFO text oldCons info log warn function text var log this sendLog WARNING text oldCons warn log error function text var log this sendLog ERROR text oldCons error log window console The library can be easily integrated into every javascript application because it is a simple code snippet with no dependencies Overriding the console is very smart because every application or framework you have used before is used for logging purposes So just by injecting this class in the frontend application your backend will start receiving logs Note that all the methods support multiple input parameters so you can call logs by sending a message correlated with log data Some sample usage of the library are listed in the next snippet console log msg mydata myvalue mydata myvalue or console error msg Now that the javascript library is ready we can start integrating it on a real world application Test it on a javascript applicationThe first step is to create a new application As the library written in the previous section is plain javascript we could use any framework In this example we used Vue js For creating a new application just run the following commands npm install vue vue create hello worldThe command will create an empty application with a single component called hello world The next step is to run the application by typing npm run serveThe application will be available at the URL http localhost Now that the application is up we have to integrate the library inside the application We can do that by simply linking the js into the index html file or copying the code in a script tag of the same file Then we have to configure the client like in the next piece of code lt DOCTYPE html gt lt html lang gt lt head gt code omitted for brevity lt lt script src lt BASE URL gt log js gt gt lt script gt console url http localhost logs console apiToken my apy token window console console lt script gt lt head gt lt body gt code omitted for brevity lt body gt lt html gt Since now our application will use the console library instead of the standard definition The final step is to write a component that proves the connection with the backend We can add to the components HelloWorld vue the following template lt template gt lt div class hello gt lt h gt msg lt h gt lt br gt lt input type text v model msg gt lt br gt lt br gt lt button v on click log gt LOG lt button gt lt br gt lt br gt lt button v on click info gt INFO lt button gt lt br gt lt br gt lt button v on click error gt ERROR lt button gt lt br gt lt br gt lt button v on click warning gt WARNING lt button gt lt br gt lt br gt lt button v on click messageWithData gt DATA lt button gt lt br gt lt br gt lt div gt lt template gt Then we can add to the component the following method for cathing the button click events methods log function console log this msg info function console info this msg error function console error this msg warning function console warn this msg messageWithData function console log this msg mydata myvalue mydata myvalue After the code is changed the application will be automatically reloaded and you will see the new application running like in the following image Then we can play with buttons sending different messages to the server You can finally go to the Strapi backend and open the logs section You will see a list of logs like in the following image Then you can enter one of the logs received for reading all the details You will find something similar to what it s shown in the next image As you can see in the previous image the data sent from the client is stored in Strapi and you can send messages accompanied by data That s a great solution for troubleshoot bugs Now that our tutorial is ended is time to think about what we have done and take conclusions ConclusionThe great benefit you have with Strapi compared to other headless solutions is that you can customize everything and work on prem or in the cloud with real control of your application The example we have seen in this tutorial is easy but you can imagine evolving to match the real world need You can set up a solution in minutes and like in this example add non trivial features to your application in minutes You can add more fields You can accumulate logs before sending and implement a backend controller that processes multiple logs in a single go This is a starting point for implementing complex solutions Because Strapi will support for sure any further need the only limitation it s your fantasy You can download the source code from this code repository both the Vue js Frontend and Strapi Backend |
2021-12-07 11:36:48 |
海外TECH |
DEV Community |
Tips about Splunk Timecharts |
https://dev.to/adaendra/tips-about-splunk-timecharts-13d2
|
Tips about Splunk TimechartsIn some requests or in some dashboards you want to have a timechart to visualize for example how much calls you receive for an operation So here are tips which can help you to work with SpanBy default the timechart will group the data with a span depending of the time period you choose But maybe you want to fix this span a particular value So here is the parametertimechart span time Where time is a number associated with a letter to define the time span Letters availables secondm minuteh hourd dayw week Examples hour spanindex application a timechart span h count by name seconds spanindex application b timechart span s count by title Thing to avoidWhen you are using the timechart avoid to have a sort in it It won t be useful and it can alter your result In a larger way be sure to remove all the treatments which are not useful for your request It will take more time for your request to be executed and as said you can retrieve a false result I hope it will help you |
2021-12-07 11:26:32 |
海外TECH |
DEV Community |
Day 10 - Tribute Page | #100DaysOfCode |
https://dev.to/jannatinnaim/day-10-tribute-page-100daysofcode-1dad
|
Day Tribute Page DaysOfCode What did I learn today I didn t learn anything but I started working on the Tribute Page project from FCC I ve done some basic page structure setup and nothing else The site is deployed here What problems did I face I haven t faced any problems so far making this page Although it s just the start So problems will ensue soon enough What do I want to do tomorrow I ll be working on this page tomorrow too as this isn t finished yet How is the experience so far I finally got some experience with setting up a real world project and honestly it s fun Useful LinksFreeCodeCampGitHub |
2021-12-07 11:22:10 |
海外TECH |
DEV Community |
Service instances in Angular |
https://dev.to/ussdlover/service-instances-in-angular-4aj
|
Service instances in Angular What is instance In JavaScript instance simply mean a new child has been born with same DNA as their parent and same DNA mean they have all their parents attributes So here In JS world Parent is Class which is in our case it is service What is service Service is just another class which have been decorated with Injectable When mark a class with this decorator we actually telling Angular to consider this class as injectable objects which can be used and injected into other classes Take this code as an example Injectable class MyService Component class MyComponent constructor private service MyService If we run our app this way we will face error with title Null Injector which is saying that service is not provided any where so it is not usable That simply mean this service does not have any instance available for our component to be used We have three way of creating InstancesAngular give us three way to create instance from our service and those will cover every use cases we have Singleton InstanceSingleton mean we will create only one instance Let s say we need to have a service to handle Authorization operations of course we do not want to have two instance of that service because maybe we do not want to use NgRx as state management as it is too complicate and we are too lazy to learn it So can store user related states in our service but we need to make sure there is only one instance Angular made it as easy as the following code Injectable providedIn root class MySingletonService The key is providedIn field which will tell Angular to provide it in root of our app so we will have one instance of our service in the app Instance per moduleIn the last section we can see we have provided the service in the root of the app But what if we want to create instance of our service per module Let s say we have some main modules that require some functionalities which is the same per each one of them Like API calls and also those modules will need to store some state in the service which provide those functionalities Store API responses but stored states data should be unique per each module The solution is as simple as the following code Injectable class MyService NgModule providers MyService class FirstModule NgModule providers MyService class SecondModule NgModule providers MyService class ThirdModule As you can see we just provided the service to that module using providers field No every component which is declared in those module can safely inject that service and be sure any data which is stored in those services instances is unique Instance per componentThis is amazing I use this solution in my every day problem solving This one can help us keep components out of any complex logic and make them highly testable Let s say that have created a Facades layer to simplify access to data layer Services which is responsible to make API calls and provide data to presentation layer Those facades layers should be exists on their own and they not even need to store anything in them So we can create them only when the component which needed that service is come alive and simply destroy it when component destroyed The solution is as simple as just provide it to component Injectable class MySrvice Component providers MyService class MyComponent constructor private service MyService How to destroy it with component Injectable class MySrvice implements OnDestroy Yes we can implement OnDestroy interface lifecycle on service this way And now we know the three way of creating instances of our services in Angular Thank you for your time and reading this Hope you liked |
2021-12-07 11:15:00 |
Apple |
AppleInsider - Frontpage News |
Samsung shakes up leadership, merges mobile and consumer divisions |
https://appleinsider.com/articles/21/12/07/samsung-shakes-up-leadership-merges-mobile-and-consumer-divisions?utm_medium=rss
|
Samsung shakes up leadership merges mobile and consumer divisionsThree of Samsung s business unit heads have been replaced in a surprise move and two new co CEOs will oversee the company s components division and its newly combined mobile and consumer electronics one Samsung s current plant in Austin TexasSamsung has gone four years without changing CEOs possibly in part because of the jailing of Lee Jae yong over bribery charges The firm s de facto leader is reportedly required to sign off on all major decisions and he was released on parole in August Read more |
2021-12-07 11:43:52 |
海外TECH |
Engadget |
Tesla is reportedly replacing some faulty Autopilot cameras for free |
https://www.engadget.com/tesla-replacing-faulty-autopilot-cameras-115552280.html?src=rss
|
Tesla is reportedly replacing some faulty Autopilot cameras for freeTesla will replace the Autopilot cameras in the front fenders of some its electric vehicles for free according to CNBC While Tesla has yet to issue a recall the news organization has seen internal documents distributed to authorized service providers in late November asking them to replace faulty repeater cameras at no cost to owners Apparently the cameras on some Model S X and vehicles manufactured by the company at its Fremont California plant have faulty printed circuit boards nbsp Those cameras capture the car s blind spots and Autopilot wouldn t work without them If they re not working as intended drivers typically only see a block box on their main display and may get alerts that their Autopilot has limited function CNBC says Tesla may have to replace cameras for at least several hundred vehicles as a result of the faulty PCBs it used A Tesla sales manager told the publication that internal service notices are sometimes followed by voluntary recalls but the automaker has yet to issue a statement Tesla recalled vehicles several times in the past over various issues In October it recalled nearly Model and Y vehicles because their front suspension lateral link fasteners may loosen The company also recalled Tesla EVs from and later in November after they became prone to false positive braking following a buggy Full Self Driving beta update |
2021-12-07 11:55:52 |
海外TECH |
Engadget |
BMW says it hit its goal of delivering one million 'electrified' vehicles |
https://www.engadget.com/bmw-says-it-hit-its-goal-of-delivering-a-million-electrified-vehicles-by-2021-112235105.html?src=rss
|
BMW says it hit its goal of delivering one million x electrified x vehiclesTwo years ago BMW delivered its th electrified vehicle including EVs and hybrids promising to deliver one million units in two years Now the company has announced that it s met that goal by delivering its one millionth electrified vehicle an iX xDrive SUV shown above to a customer in Europe It s also promising to double that tally to two million by next year while delivering two million fully electric EVs by nbsp BMW was a pioneer in the pure electric category with the i and i EVs but has been slow to ramp up its offerings since then As such the majority of its electrified sales have been hybrid rather than pure EVs The term quot electrified quot generally encompasses both PHEVs mild hybrids and EVs Between January and September of BMW reportedly sold EVs and plug in hybrid vehicles worldwide according to CleanTechnica In it sold plug in vehicles including PHEVs and EVs InsideEVs nbsp reported nbsp This year the company launched the i sedan and iX SUV pure electric models into the US market but they only went on sale last month It also offers four PHEVs including versions of the X and models Over the next year BMW will add the fully electric BMW series and X plus the high volume BMW series by It plans to have quot about ten million fully electric vehicles on the road quot by or so |
2021-12-07 11:22:35 |
海外TECH |
CodeProject Latest Articles |
Deep Learning |
https://www.codeproject.com/Articles/1216535/Deep-Learning
|
understanding |
2021-12-07 11:20:00 |
医療系 |
医療介護 CBnews |
第3期がん対策計画、中間評価の報告書案を提示-厚労省、21年度内に取りまとめ |
https://www.cbnews.jp/news/entry/20211207200726
|
厚生労働省 |
2021-12-07 20:15:00 |
ニュース |
BBC News - Home |
Western leaders urge Russia to lower Ukraine tensions |
https://www.bbc.co.uk/news/world-europe-59558099?at_medium=RSS&at_campaign=KARANGA
|
ukraine |
2021-12-07 11:13:54 |
ニュース |
BBC News - Home |
Arthur Labinjo-Hughes: Safety warnings ignored, says grandfather |
https://www.bbc.co.uk/news/uk-england-birmingham-59558282?at_medium=RSS&at_campaign=KARANGA
|
welfare |
2021-12-07 11:01:21 |
ニュース |
BBC News - Home |
Storm Barra brings strong winds, heavy rain and snow to NI |
https://www.bbc.co.uk/news/uk-northern-ireland-59559544?at_medium=RSS&at_campaign=KARANGA
|
electricity |
2021-12-07 11:23:36 |
ニュース |
BBC News - Home |
2022 Beijing Winter Olympics: China criticises US diplomatic boycott |
https://www.bbc.co.uk/news/world-us-canada-59559703?at_medium=RSS&at_campaign=KARANGA
|
beijing |
2021-12-07 11:39:30 |
ニュース |
BBC News - Home |
Covid-hit Scarlets concede Champions Cup game at Bristol |
https://www.bbc.co.uk/sport/rugby-union/59553161?at_medium=RSS&at_campaign=KARANGA
|
Covid hit Scarlets concede Champions Cup game at BristolScarlets concede Saturday s European Champions Cup game at Bristol Bears over the Covid crisis that means the vast majority of their squad are in isolation quarantine in Belfast |
2021-12-07 11:02:44 |
北海道 |
北海道新聞 |
動物の福祉、生物多様性を規定 札幌市、動物園条例の素案公表 |
https://www.hokkaido-np.co.jp/article/620195/
|
生物多様性 |
2021-12-07 20:13:05 |
北海道 |
北海道新聞 |
サッカー日本代表にコンサドーレの小柏を初選出 |
https://www.hokkaido-np.co.jp/article/620088/
|
北海道コンサドーレ札幌 |
2021-12-07 20:12:54 |
北海道 |
北海道新聞 |
釧路湿原全国車いすマラソン大会 今後開催せず |
https://www.hokkaido-np.co.jp/article/620138/
|
車いすマラソン |
2021-12-07 20:08:13 |
北海道 |
北海道新聞 |
真鍋さんにノーベル賞メダル授与 北大・山中教授「世界動かした研究」快挙喜ぶ |
https://www.hokkaido-np.co.jp/article/620183/
|
真鍋淑郎 |
2021-12-07 20:07:14 |
北海道 |
北海道新聞 |
立民も文通費の使途公開法案提出 自公は日割り優先、与野党に溝 |
https://www.hokkaido-np.co.jp/article/620194/
|
文書通信交通滞在費 |
2021-12-07 20:04:00 |
ビジネス |
東洋経済オンライン |
「理不尽なPTA運営」にモノ申すときの重要な視点 入会届を出していないのに「自動加入」になったら | 学校・受験 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/473239?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
日本全国 |
2021-12-07 20:30:00 |
IT |
週刊アスキー |
Nintendo Switch版『ぎゃる☆がん だぶるぴーす』が2022年3月17日に発売決定! |
https://weekly.ascii.jp/elem/000/004/077/4077406/
|
nintendo |
2021-12-07 20:20:00 |
コメント
コメントを投稿