投稿時間:2022-04-10 20:22:44 RSSフィード2022-04-10 20:00 分まとめ(25件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita vimeo APIを公式のpythonライブラリで使用するサンプル https://qiita.com/dx80y4/items/76b4da50cce904d7994c vimeo 2022-04-10 19:33:35
js JavaScriptタグが付けられた新着投稿 - Qiita ESP32+QuickJS+Blocklyの例 https://qiita.com/poruruba/items/a3e53ed75cdeae6dfec8 blockly 2022-04-10 19:43:01
Ruby Rubyタグが付けられた新着投稿 - Qiita deviseを使用時に名前を表示できない時の解決方法 https://qiita.com/seiyarick/items/c005f17122ad0c086c27 devise 2022-04-10 19:45:54
AWS AWSタグが付けられた新着投稿 - Qiita Cloudformation基礎 https://qiita.com/tatsuya11bbs/items/237b7a17f4cd0fd9c5d8 teformatversiondescripti 2022-04-10 19:42:46
Ruby Railsタグが付けられた新着投稿 - Qiita deviseを使用時に名前を表示できない時の解決方法 https://qiita.com/seiyarick/items/c005f17122ad0c086c27 devise 2022-04-10 19:45:54
技術ブログ Developers.IO Azure Static Web Appsのエンタープライズレベルのエッジ機能の有効化に失敗する場合がある https://dev.classmethod.jp/articles/azure-static-web-apps-enterprise-grade-edge-failed/ azurestaticwebapps 2022-04-10 10:33:36
海外TECH DEV Community Djinn CI v1.2 https://dev.to/andrewpillar/djinn-ci-v12-4ldc Djinn CI vI ve written about Djinn CI before Since that post more work has gone into it to weed out bugs and implement more features specifically variable masking You can read more about the full release on the blog here Djinn CI is an open source continuous integration platform designed with simplicity in mind There is of course a hosted version you can pay to use should you not wish to maintain your own infrastructure 2022-04-10 10:28:46
海外TECH DEV Community How to Offset a Server's Timezone to Store a UTC Datetime https://dev.to/kaxmoglan/how-to-offset-a-servers-timezone-to-store-a-utc-datetime-18c7 How to Offset a Server x s Timezone to Store a UTC DatetimeTLDR the Javascript Date object is nasty This is how I stored a UTC time in a Postgres database using the Javascript Date object ProblemAs part of building a microservice responsible for handling bookings between users each of whom could be in any timezone and also travel into any timezone between making the booking and fulfilling the booking I stumbled across a little issue when it came to storing the UTC time For this microservice I m using Typescript Koa Prisma and Postgres It s out of the scope of this article to talk through the entire infrastructure or indeed how the whole microservice works but here s what the relevant part of my Prisma schema looks like model Booking bookingId String id default uuid userId String userId String lengthMins Int startDateTimeUTC DateTime dateTimeCreated DateTime default now dateTimeUpdated DateTime Here s how we could create a new row in our Booking table await db booking create userId user userId user lengthMins startDateTimeUTC new Date T All we re trying to do here is using Prisma store a new row in our Booking table that represents a booking between user and user at on th April UTC When running a function like this albeit this would exist inside a try catch block in a re usable function I naively expected the time to be stored as you know the time I passed into the Date constructor Unfortunately this didn t happen What happens is the time gets converted into the server s local time I was running this code locally in BST UTC so in this example the time would have been stored as SolutionMy solution for the entire system was to store all datetime information in the database in UTC then use the user s device location with permission of course to convert the stored time into the user s local time My solution for this specific issue without the use of any rd party libraries and without having to store extra information like the server s timezone was to create a function that used Javascript s Date object to offset the server s timezone before we store it This looked like the following function getUTCTime dateTimeString string Date const dateTime new Date dateTimeString const dateTimeNumber dateTime getTime const dateTimeOffset dateTime getTimezoneOffset const dateTimeUTC new Date dateTimeUTC setTime dateTimeNumber dateTimeOffset return dateTimeUTC What we re doing here is Creating a new Date object as we did in the first example using a UTC datetime string that we can pass into the function Getting the datetime in number format or the number of milliseconds from midnight on January to datetime we pass in Using the getTimezoneOffset method to get the difference in minutes between the date as evaluated in the UTC time zone and the same date as evaluated in the local time zone We multiply this value by to convert this number into milliseconds to make it more useful to use later Creating a new Date object with new Date which will be instantiated with the current datetime Assigning the value of our new Date object to the datetime we passed into the function minus our server s timezone offset datetimeNumber dateTimeOffset Returning the Date object that we ve now successfully set to the dateTimeString we originally passed the function Now when we add a row into our table we can do something like this await db booking create userId user userId user lengthMins startDateTimeUTC getUTCTime T Peace OutThere are libraries that cater for this kind of thing very well The main one I use being date fns but this is a fairly easy manual solution which solved my problem This will work anywhere around the world too as it just offsets the timezone of the server you re running the code on As always I hope this helped you in some way or you at least found it an interesting read I would love to hear any and all timezone puzzles you may have been a part of solving I ve found that timezones are one of those annoying rabbit holes that are really easy to make mistakes with Fingers crossed this isn t one of them 2022-04-10 10:25:06
海外TECH DEV Community How leaders can mess with Agile https://dev.to/neghani/agile-for-leadership-35c5 How leaders can mess with AgileI have witnessed companies collapse or see great setbacks by implementing agile incorrectly So I know some pitfalls I have seen people say take a sprint and complete the project I kind of feel that guy was Judge jury and executioner for the team Hi my name is Ganesh and I am here to talk about Agile for leadership teams If your company is planning to move away from the waterfall kind of framework and adopt SCRUM Framework Agile Philosophies please be cautious there are a lot of pitfalls Below are some pitfalls I was talking about Buy tools and Hire SCRUM talent in a month or so we will be agileLet s not touch the org structureI don t need to changeMy client stakeholders don t need to knowAgile is going to save me moneyLet me explain how these ideas are going to fail you Buy tools and Hire SCRUM talent Let s be AgileThis thinking is not correct SCRUM is not some tool or training SCRUM is a practice it is a cult Tools and training are essential but that s not all Agile change is a continuous process to change the mindset of associates workflows delivery model and technology stacks so its a reinvention but again all this can happen over a course in agile that s what agile is one goal at a time Let s not touch the org structureAgile works best in a flat structured organization This means few or no levels of middle management between staff and customers stakeholders This increases the responsibility of a scrum team and improves coordination and communication So re alignment of the organization is really important I don t need to changeAs leaders your expectations or goals are the organization s goals which means you are the first person to start thinking the agile way The promises or agreements to the clients or stakeholders should come from teams working on the project So you will become responsible for the teams and teams will become responsible for delivery My client stakeholders don t need to knowNo they should know that Agile changes the delivery model from all at once to one thing at a time this means everybody s expectations should be aligned to the agile delivery model Agile is going to save me moneyNo Agile is a value focused framework financial befit will be a by product of the value focused delivery The product or customer is the center of the agile journey the customer or products might demand a lot of changes to the scope or estimates So if your focus is not product or customer you better stay away from agile Thanks for reading please do comment on what other pitfalls misunderstandings you saw Please do follow so I can send more awesome articles 2022-04-10 10:23:23
海外TECH DEV Community Basics of Coaching https://dev.to/kayea_/basics-of-coaching-4df3 Basics of CoachingThis week I attended three sessions on Leadership Essentials about coaching in particular Coaching is a very broad topic and requires a lot of training for the new leader and we focused only on the basic theory of what it is and practiced with each other on doing coaching based on random scenarios by the attendees What is Coaching Coaching in its simplest form is unlocking a person s potential to achieve their goals through questions I highlighted questions in the definitions because it is the core of it s definition the coach merely asks questions to the coachee guiding them to think of what they wanted to do in a certain situation Coaching vs MentoringAs leaders it is very easy to assume that you are better than a person seeking coaching When a person comes to you with a problem the initial reaction is to put yourself in the same situation think of a solution in your perspective and give that advice That is mentoring To be a coach you have to try your best not to give advice but rather ask questions I feel like I would be repeating myself As a coach you trust that the coachee is in a better position to think of ways on how to handle a situation they are in and you help them do that by again asking questions There are different ways of mentoring and coaching is the sweet spot between asking questions and creating solutions ADAPT FrameworkDiving in to the framework to follow when coaching there is the ADAPT framework ADAPT is a step by step process that the coach can follow before and during their conversation with the coachee GROW FrameworkBeing more specific on the conversation the starting coach can follow the question map of the Grow method Grow stands for the following G oalsR esultsO bstaclesW ay forwardGoals describes what you are going to talk about Ask what questions to get the information What are the things that we want to focus on What did we agree on last time Results are the realities what is going to happen or the whole picture of the situation What are some data points that we can look at What did you really do well What are things you could have done better Note that the questions are more of what than why and eliminates the blame or negative feeling to the coachee to foster opening up to the coach Obstacles or Options are way forwards What were some of the things that got in the way or What have we not tried before that might be worth trying now Who might be able to help And lastly Way Forward are conclusion questions What steps are you going to take moving forward When are you planning to do this What support do you need from me When would be a good time to get together again about this I didn t write about the actual scenarios that we practiced on but ultimately to describe how the practice would go as a coach put more trust in the coachee to come up with their own solution no matter how hard it is to give your opinion Once they are able to provide those options solutions conclude the discussion with When What else do you need from me or just simply OK Coaching is really hard Hahah 2022-04-10 10:18:39
海外TECH DEV Community Managing tracking consent with Cead Consent https://dev.to/accudio/managing-tracking-consent-with-cead-consent-1j92 Managing tracking consent with Cead ConsentAn issue many businesses and sites will have to deal with is cookie and tracking consent on their websites The web however is plagued with a huge number of intrusive trackers and terrible frustrating and often illegal consent dialogs Many websites implement a notice that doesn t allow opt out some offer an option that does nothing whilst others only offer an opt out solution conveniently after they ve collected all of your data Cead pronounced kee yed is a cookie and tracking consent manager that is simple lightweight easy to implement and free It s designed to help you implement a simple Accept or Deny dialog that will actually enable or disable tracking Cead is primarily created in response an increase in unsolicited web surveillance but also to assist with meeting the standards of regulation including the EU GDPR amp ePrivacy and California s CCPA As privacy legislation becomes more strict it s important that solutions offer compliant opt in and opt out controls which Cead offers at it s core Table of ContentsThe problemA possible fix Cead ConsentUsing Cead Consent to manage Google Tag ManagerConclusion The problemTracking on the web has long been a difficult topic The interests of business owners SEO teams Ad vendors site users and lawmakers become almost impossible to resolve and frequently ignore each other I m of the opinion that a site should have no tracking This site has no analytics or anything because your browsing is your own business Check out Jeremy Keith s Ain t No Party Like a Third Party for his insight on third party scripts I find however that is an impossible stance to maintain when building sites for other people They are often used to tracking metrics to evaluate their success generate leads or target their services I ve worked in agencies where I ve seen and worked on a lot of websites for a variety of clients They vary in purpose build location size and much more but one thing almost all have in common is they handle tracking terribly This may be familiar to you but if not let me demonstrate the situation We build a site for a client and add Google Analytics to it pretty standard Google Analytics has an easy way to allow people to opt out by setting a global variable so we integrate a wee popup that allows the user to opt out That works great until the client gets an SEO expert who wants to track conversions better They ask you to add a couple more scripts and you dutifully do so but these have no way to opt out so all you can do is add them Later on they want to add more scripts so they either ask for a text box to add them arbitrarily install plugins or install a Tag Manager Before long the site has analytics scripts conversion trackers and a screen recorder Few of these respect the user s privacy settings or have a way to opt out and the website slows to a crawl Some developers will give up at the beginning of this process and instead of asking consent put a message saying This site uses cookies and tracks you Deal with it or fuck off Seriously check out MouseFlow screen recorder it s actually scary I worked for a client a couple years ago who had it installed and you could see a recording of every user s session Combined with GeoIP giving you the town they lived in the client could make a pretty accurate guess as to exactly who that user was Ah yes that s probably Brian I tried to sell x to him last week but looks like I should try sell him y instead based on how he s used the website Why this is an issueThere are two reasons why this is a problem Ethical and legal Ethically if this is your site you are stalking your users standing metres behind them as they peruse your store The level of what is acceptable here can be debated but tracking someones every move without their ability to consent to this is not justified Place yourself in Brians shoes from the example above and it s hard to dispute This is also illegal in many jurisdictions Consumer privacy laws like GDPR and ePrivacy in the EU and CCPA and similar in American states requires some level of consent to web tracking I m not a lawyer so contact one for proper advice but this gist is at minimum you need a way for users to be able to meaningfully opt out of tracking The opt out issueThe big problem with the requirement to offer an opt out is that this is very hard to do As I mentioned earlier some scripts like Google Analytics offer a method to opt out This still isn t ideal as you re loading a tracking script and then checking if you re allowed to run it but it at least gives you some control However that is the only tracking script I have come across that allows a way to opt out Pretty much all other scripts will happily run as soon as they load without regard for consequences Even if they did have methods to opt out it would be individual for each service and be a nightmare to manage Developers can deal with this by dynamically adding scripts under certain conditions but clients will want to add their own and often have no consideration for the consequences As developers we re left in a difficult position Laws require that tracking can be opt out but we have no way to do so A possible fix The way to fix this is to be in control of all tracking scripts and then load them ourselves in response to a consent status There are many solutions to do this as investors have monopolised on businesses grappling with the issue of tracking and consent Companies like OneTrust offer pricey hosted consent solutions that supposedly solve all your problems However when I load their site my browser tells me it s blocked trackers If you ve ever been annoyed by a cookie popup it s probably a solution like this A big annoying popup that makes opting out difficult and will send all your preferences to a tracking service to track your consent My opinion is that these companies are morally corrupt Tracking the consent of users on a remote server is still tracking and they charge extortionate fees to fix a problem their own investors created I think the fix is a lot easier Our webpage only runs tracking scripts when we say so That s why I made Cead Consent Cead ConsentCead Consent is a small library designed to solve the issue of tracking consent by controlling when scripts can run on the client side By making a tiny modification to tracking scripts we can load them on demand in response to consent status It is designed to be extremely simple easy to use and lightweight and I ll give you a quick demo of how you would use it to solve the problem of consent Check out the GitHub repo for full instructions on installation and usage Using Cead Consent to manage Google Tag ManagerFirst we need to install Cead It can either be loaded from a CDN or installed via npm here I ll use the CDN to make it easier We need to add a CSS file a JavaScript file and a little bit of HTML lt html gt lt head gt lt link rel stylesheet href dist cead css gt lt head gt lt body gt lt p gt Hi Could we please enable some services and cookies to improve your experience and our website lt p gt lt div class cead btns gt lt button class cead btn cead btn decline gt No thanks lt button gt lt button class cead btn cead btn accept gt Okay lt button gt lt div gt lt div gt lt main gt lt your page content gt lt main gt lt script src dist browser js gt lt script gt lt body gt lt html gt Although Cead consent can be used with all sorts of tracking scripts or pixels I feel it s at it s best when combined with a tag manager like Google Tag Manager We manage tracking scripts and images by modifying their code slightly so they ll only run when Cead allows them to When used with a Tag Manager the client or SEO teams can add as many scripts as they d like to Google Tag Manager and we need to modify only one script for Cead When you copy your script from Google Tag Manager it will look something like this with a different GTM MEASUREMENT ID lt script gt dataLayer function w l w l w l w l push gtm start new Date getTime event gtm js window dataLayer lt script gt lt script async src l dataLayer gt lt script gt See that last line the lt script async src gt All we need to do is change the src attribute to data src and add the data cead attribute like so lt script gt dataLayer function w l w l w l w l push gtm start new Date getTime event gtm js window dataLayer lt script gt lt script async data src l dataLayer data cead gt lt script gt And that s it With the installation of Cead and that small change to the script tag we ve made it so users can choose to consent to tracking or not and their choice is respected ConclusionAlthough the best situation is to avoid adding tracking to sites where possible it often isn t possible The best situation then is to use a lightweight simple consent manager that won t frustrate users will respect their consent choices and is free and open source Cead has more options including managing inline scripts tracking pixels an opt out mode cookie removal and more Check out the documentation on the GitHub repo to see all it can do If you have any comments or feedback on this article let me know I d love to hear your thoughts go ahead and leave me a comment send me an email at alistair accudio com or contact me on Twitter The post Managing tracking consent with Cead Consent appeared first on alistairshepherd uk 2022-04-10 10:17:24
海外TECH DEV Community Deepgram x DEV Hackathon Project DeepXGrammar https://dev.to/leo1612d/deepgram-x-dev-hackathon-project-deepxgrammar-54m7 Deepgram x DEV Hackathon Project DeepXGrammar Overview of My SubmissionI have built a simple but useful solution using Deepgram python sdk and language tool opensource library This is version of this tool i have plans to upgrade amp customised it in multiple ways any suggestions are welcome please put in comment sections About this toolBasic use case is for checking grammar in audio files This tool is simply take one audio url as input Then using DeepGram api it will fetch transcript from it Using language tool we will get all the mistakes and correctionsThis tool will provide corrected transcript back Submission Category Wacky Wildcards Link to Code on GitHub LEOD colabProjects colabProjects View on GitHub Additional Resources InfoOpensource library for checking grammar language tool ScreenshotsOriginal TranscriptSuggested correctionCorrected Transcript Upcoming Feature updatesBetter UI and UX Checking grammar mistakes on live data Enable access to videos as well Interactive grammar practice functionality Enable for other languages 2022-04-10 10:14:46
海外TECH DEV Community Typescript Compiler API:How to get absolute path to source file of import module using typescript compiler api https://dev.to/dastybun/typescript-compiler-apihow-to-get-absolute-path-to-source-file-of-import-module-using-typescript-compiler-api-26o Typescript Compiler API How to get absolute path to source file of import module using typescript compiler api Typescript Compiler API How to get absolute path to source file of import module using typescript compiler api Apr Comments Answers I try to get the path information as follows const typeChecker program getTypeChecker const importFileSymbol typeChecker getSymbolAtLocation importDeclarationNode moduleSpecifier const path importFileSymbol valueDeclaration path In this way I can get the sourceFile object of the module source file and get the absolute path of the module through the path… Open Full Question 2022-04-10 10:07:10
海外ニュース Japan Times latest articles Shehbaz Sharif set to become next Pakistan PM after Imran Khan’s ouster https://www.japantimes.co.jp/news/2022/04/10/asia-pacific/politics-diplomacy-asia-pacific/pakistan-imran-khan-no-confidence-ousted/ Shehbaz Sharif set to become next Pakistan PM after Imran Khan s ousterKhan was dismissed after losing a no confidence vote paving the way for an unlikely opposition alliance that faces the same issues that bedeviled the cricket 2022-04-10 19:24:02
海外ニュース Japan Times latest articles Lotte pitcher Roki Sasaki throws Japan’s 16th perfect game https://www.japantimes.co.jp/sports/2022/04/10/baseball/japanese-baseball/lotte-roki-sasaki-perfect-game/ Lotte pitcher Roki Sasaki throws Japan s th perfect gameThe year old s no hitter was the th in Japanese pro baseball and the first since Aug as well as Japan s first perfect game since 2022-04-10 19:17:14
ニュース BBC News - Home French election: Macron faces far-right challenge as France votes https://www.bbc.co.uk/news/world-europe-61049717?at_medium=RSS&at_campaign=KARANGA emmanuel 2022-04-10 10:18:26
ニュース BBC News - Home Imran Khan ousted as Pakistan's PM after vote https://www.bbc.co.uk/news/world-asia-61055210?at_medium=RSS&at_campaign=KARANGA confidence 2022-04-10 10:39:57
北海道 北海道新聞 女性力士80人が熱戦、大阪・堺 3年ぶりに選抜大会 https://www.hokkaido-np.co.jp/article/667906/ 女子相撲 2022-04-10 19:34:00
北海道 北海道新聞 道南で125人感染 新型コロナ https://www.hokkaido-np.co.jp/article/667854/ 道南 2022-04-10 19:22:20
北海道 北海道新聞 釧路管内101人、根室管内14人感染 新型コロナ https://www.hokkaido-np.co.jp/article/667881/ 根室管内 2022-04-10 19:21:54
北海道 北海道新聞 卓球選考会、吉村と平野が優勝 杭州アジア大会 https://www.hokkaido-np.co.jp/article/667905/ 東京都北区 2022-04-10 19:19:00
北海道 北海道新聞 慶大、法大が勝ち点 東京六大学野球第1週 https://www.hokkaido-np.co.jp/article/667904/ 東京六大学野球 2022-04-10 19:19:00
北海道 北海道新聞 愛知県の山間部でキャビア生産 豊根村、養殖開始から10年 https://www.hokkaido-np.co.jp/article/667902/ 愛知県豊根村 2022-04-10 19:12:00
北海道 北海道新聞 戦争反対で代表招集されず イランのフットサル女子 https://www.hokkaido-np.co.jp/article/667901/ 戦争反対 2022-04-10 19:09:00
北海道 北海道新聞 J1、横浜Mが鹿島に快勝で2位 広島は3連勝 https://www.hokkaido-np.co.jp/article/667900/ 鹿島 2022-04-10 19:02:00

コメント

このブログの人気の投稿

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

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

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