投稿時間:2021-08-19 22:29:08 RSSフィード2021-08-19 22:00 分まとめ(39件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Techable(テッカブル) 換気不足を視覚化するCO2センサーライト「CO×CO Cube」 https://techable.jp/archives/160162 cocube 2021-08-19 12:00:33
python Pythonタグが付けられた新着投稿 - Qiita 【競プロ典型90問】007の解説(python) https://qiita.com/wihan23/items/5fc929eac7d2be2c9187 そこで今回は、事前にAをソートし、二分探索を行うことで、Bに最も近い値を高速で求めます。 2021-08-19 21:57:24
python Pythonタグが付けられた新着投稿 - Qiita FC2ブログのエクスポートからCSVファイルを作る https://qiita.com/08thse/items/1534e9fa37da0986f935 FCブログのエクスポートは、下記のような形で出力されます。 2021-08-19 21:53:04
js JavaScriptタグが付けられた新着投稿 - Qiita JavaScriptを基本からまとめてみた【13】【非同期処理】 https://qiita.com/kanfutrooper/items/5ffc6d37ed133db39544 mainjsletintletintintとintに値をセットする関数functionsetintabsetTimeoutfunction処理の実行に秒の遅延intaintbintとintを足し算する関数functionsumintalertintintsetint変数に値をセットsumint足し算したものをアラートで表示同期処理を作る方法上記の結果が″になったコードを″となるようにコードを組む方法がつある。 2021-08-19 21:52:41
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Rspec request コントローラー単体テストでのエラー https://teratail.com/questions/355161?rss=all Rspecrequestコントローラー単体テストでのエラー前提・実現したいことrspecnbsprequestでコントローラー単体テストを実装しています。 2021-08-19 21:48:08
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) C++のイテレータについて https://teratail.com/questions/355160?rss=all iterator 2021-08-19 21:19:12
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) gas チェックボックスで列 (複数列)を表示非表示 https://teratail.com/questions/355159?rss=all リンク内容で、これを参考に列版を作成したいと思いましたが、この関数には初期化処理があります。 2021-08-19 21:19:10
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) videoタグで再生させた動画のスムーズさについて https://teratail.com/questions/355158?rss=all htmlのvideoタグにて動画を貼り付けてるのですが、決まったところで止まったり、スムーズに再生されない事が頻繁するようです。 2021-08-19 21:05:47
AWS AWSタグが付けられた新着投稿 - Qiita 【98時間】AWS認定デベロッパー - アソシエイト(DVA)勉強方法 https://qiita.com/ryo1112/items/195cad4331daaf0091e2 今回も勉強方法を書いていきます受験前までのスペック業務未経験応用情報技術者試験合格AWS認定ソリューションアーキテクトアーキテクト合格合格までのコスト勉強期間はか月勉強時間は時間費用は試験代模擬試験代参考書で約円使用した教材教材ポケットスタディAWS認定デベロッパーアソシエイトAWSWEB問題集で学習しようUdemyAWS認定デベロッパーアソシエイト模擬試験問題集回分問AWSサービス別資料通称、BlackBeltAWS公式模擬試験勉強履歴時間ポケットスタディ初めにポケットスタディを周読みました問題を解くのを含めて。 2021-08-19 21:47:12
技術ブログ Developers.IO EC2 インスタンス一覧を特定の条件でフィルタリングしてから特定の項目を抽出した上で CSV 形式で出力してみた https://dev.classmethod.jp/articles/ec2-export-csv/ 項目 2021-08-19 12:51:10
技術ブログ Developers.IO 東京2020オリンピックボランティアをしてきた話 https://dev.classmethod.jp/articles/about_being_olympic_volunteer_obuchi_hugo/ 開催 2021-08-19 12:43:11
技術ブログ Developers.IO Thunder Client: The successor to POSTMAN! https://dev.classmethod.jp/articles/thunder-client-the-successor-to-postman/ Thunder Client The successor to POSTMAN In the Technology industry there is a constant demand for UPDATES in existing tools libraries and software 2021-08-19 12:09:49
海外TECH Ars Technica Genesis’ first electric vehicle will be the GV60 SUV, due in 2022 https://arstechnica.com/?p=1788444 battery 2021-08-19 12:24:47
海外TECH DEV Community Must known JavaScript console.log() tips and tricks! https://dev.to/thedailytechtalk/must-known-javascript-console-log-tips-and-tricks-2cfo Must known JavaScript console log tips and tricks Must known JavaScript console log tips amp tricks JavaScript ConsoleThe console object provides access to the browser s debugging console e g the Web console in Firefox The specifics of how it works varies from browser to browser but there is a de facto set of features that are typically provided Most developers usually use console log to debug JavaScript code but console provides us with such a powerful set of features it would be shame not to use them or at least know what they do console log For general output of logging information console info Informative logging of information console warn Outputs a warning message console error Outputs an error message to the Web console Using other logging besides console log will provide you with more informative and clearer logs Lets start by exploring console objectAs we can see Console object has plenty of methods Lets explore some of more useful ones console clear The console clear clear the console console dir console log prints the object in its string representation while console dir recognizes the object as an object and prints it s properties in the form of a clean expandable list const dog name Rex age friends cat dog duck console dir dog console table With console table we can create beautiful tables This is probably my favourite console method console time console timeLog and console timeEnd Use console time to start a timer Use console timeLog to print time elapsed since the timer started Use console timeEnd to print the total amount of time since console time started console group and console groupEnd The console group method creates a new inline group in the Web console log This indents following console messages by an additional level until console groupEnd is called console logging with CSSThis works with most console method such as log warn error etc Please note that we have to use c for css to work console log cTheDailyTechTalk color red font family system ui font size rem webkit text stroke px black font weight bold I recently started a new blog TheDailyTechTalk where I create free content If you liked this post and would like to read more posts about javascript please check it out If you like what I write and want to support me please follow me on Twitter to learn more about programming and similar topics ️️ 2021-08-19 12:47:29
海外TECH DEV Community My Journey from Angular to React in 2021 https://dev.to/indrajitbnikam/my-journey-from-angular-to-react-in-2021-5bai My Journey from Angular to React in My Journey from Angular to React in Hi Folks long time no see Hope everyone is safe amp doing fine amidst this Covid situation This time I have a different topic to talk about i e How I transitioned from an Angular Developer to a Senior React Developer in Hope you will learn and be able to relate a thing or two from my journey Angular historyI got introduced to Angular back in when I was doing my PG DAC course in Sunbeam Institute CDAC Centre Pune It was very brief but it got me started with Angular Development After the course was completed I got a job offer from Siemens India Where I spent the last years working on Angular related projects I learned so much during this time from my awesome colleagues and through self teaching This time helped me build a strong foundation as a framework agnostic web developer During this time I also explored Web Assembly CSS in depth and many other interesting topics related to web development Roadblocks aheadI think Angular is pretty good as a framework in fact in certain aspects it s better than react Now that I work with react I m allowed to say that But much as I loved working with Angular on different projects Soon I realised that that s not what everybody thinks When I learned about React Vue s popularity year back I was stunned I did my research at the time and I just could not ignore the fact that React has much more jobs than Angular worldwide which means more opportunities A pretty good number of big companies use React For example Netflix Twitter Airbnb AWS to name a few Sheer amount of community size that reacts has especially because of JS as opposed to TS based Angular Which means more support This is just scratching the surface A lot of new startups prefer to React as their go to framework for web development This is also the reason I got a job at Cashfree as well You can find many detailed comparisons in the following articles So my reason was not something technical like react is much better than angular when it comes performance bla bla bla Because I don t think one is better than the other both are great frameworks build by brilliant people It was rather the ecosystem that React has developed so far that led me to believe it s time to switch the framework for good React JourneyI had decided to switch to react as my primary framework about a year ago Initially I did not have any idea where to start So I started with some youtube videos to get some feel of React But they were short and did not provide much information I used to create small applications like the Todo app or tic tac toe game etc in my spare time But it was still not enough Unlike Angular I did not work on React in a professional capacity at the time So It was hard for me to understand how the entire ecosystem works together All I was working on was some small apps that only gave me insights into few features of React Trust me I hated React in the first few weeks as I was heavily used to Typescript before that Angular people can relate better After quite some time Approx months I realised that the only way for me to learn a great deal about React is through some bigger project So started looking for such courses on Udemy My goto learning platform also created in React After compiling down to a few courses The course that I found the most helpful was Complete React Developer in w Redux Hooks GraphQL BTW this is not an affiliated link Authors of the course Andrei Neagoie amp Yihua Zhang are very experienced amp passionate developers Their teaching style is also pretty simple You learn everything by doing They have only worked on one project throughout the course to teach all the below topics which helps you understand how the entire ecosystem works together which you should know It teaches you about React libraries like React router Redux Thunk Redux saga etc Styled componentsHOC Container patternsReact HooksContext APIGrapghQL ApolloPerformance OptimisationTestingand much more On top of that ZTM ZeroToMastery gives you access to the discord community which has a huge number of active members I just can t emphasise enough how great this course is ️ React Dev JobAt this point I was already familiar with React to pretty good lengths I had also worked on a lot of projects You can find them on my portfolio here I also created my portfolio using react during this time to stand out even more Now it was time to search for a react job and cracking it In the beginning I tried using platforms like Naukri com LinkedIn com etc I used to apply almost everywhere in the beginning with my so called Indian Mentality Good number of companies used to follow up soon as well But After having discussions I used to get the same feeling over and over again Interviews felt a bit easy I could not picture myself learning something in these companies Not referring to every company So I wanted to apply for a job at some startups that I knew back then and were doing great IMHO Coincidentally One day I tried applying to this blogging platform Hashnode At the time they used to post their jobs on Notion amp AngelList That s how I got to know about AngelList There were few other good sites that I found later But AngelList changed my life and Aspirations It not only had great startups listed on it It even had a job posting from across the world with compensation mentioned That just blew my mind and I got a better stand of how much I am worth in the IT industry I now started compiling job opportunities from AngelList I started applying soon after To be honest I applied at more than job postings I gave more than interviews during the span of months As I spent a lot of time being interviewed almost every day I learned a lot about my improvement areas and eventually became good at those At the end of this Job Search Spree I found my current company Cashfree and I finally accepted an offer for Senior Frontend Developer At Cashfree alone I gave about Interviews and some Technical Tests Indrajeet Nikam indrajeet nikam Excited to announce that I have joined gocashfree in the Engineering team Looking forward to working with my awesome colleagues and developing cutting edge solutions for the fintech ecosystem I can already feel the adrenaline of working in a dynamic workplace Cashfree AM Aug AdviceFew things that helped me Preparing for almost a year being interviewed times creating your own portfolio All of it might look daunting to some people including me year ago But don t let it discourage you from starting small I never planned to do this many things in the first place It just happened So don t worry It s worth the effort Work on your online presence for better opportunities Get your basics right I mean JavaScript CSS in case of frontend dev Be Patient in your job search You don t have to join the first company you apply to You almost always get less pay than you deserve that way Be open minded for opportunities and plan logically Most important Don t get into this Angular vs React fight Both are great and you should know both at least to a certain extent I used to blog on fullyunderstood com you can check my previous blogs there From here onwards I ll be posting all my blogs on this domain blog indrajeet me In case you are interested in Technical blogs regarding web development You can consider following me here on LinkedIn or on Twitter 2021-08-19 12:30:19
海外TECH DEV Community How to add a new line in Python? https://dev.to/hrishikesh1990/how-to-add-a-new-line-in-python-821 How to add a new line in Python In this short tutorial we look at how to add a Python new line We look at the Python new line character and how the other methods can be used This tutorial is a part of our initiative at Flexiple to write short curated tutorials around often used or interesting concepts Table of Contents Python new line Python new lineNewline character in PythonMulti line stringClosing thoughts Python new line Python new line In programming it is a common practice to break lines and display content in a new line This improves the readability of the output Apart from that you would frequently come across the new line character a lot while working with files Hence it is quite important that you understand how to add a new line and familiarise yourself with how the new line character works This tutorial is aimed to do the same Newline character in Python In Python the new line character “ n is used to create a new line When inserted in a string all the characters after the character are added to a new line Essentially the occurrence of the “ n indicates that the line ends here and the remaining characters would be displayed in a new line Code and Explanation str Hire the top n freelance developers print str Output Hire the top freelance developers As aforementioned the character after the new line character is printed in a new line Different ways to implement this would include either adding it to string directly or concatenating it before printing it A common question that beginners have while learning how to apply a new line is since we are adding it to a string Why doesn t Python print “ n as it is And how does it know that a new line must be added Well the backslash “ in the new line character is called an escape sequence Escape sequences are used to add anything illegal to a string This way Python understands that the following character is not a part of a string and executes it Multiline Strings Multiline strings are another easy way to print text in a new line As the name suggests the string itself spans over multiple lines These strings can be assigned by using either double quotes or single quotes Python understands that the string is a multiline string and prints it as such Code and Explanation str Hire the top freelance developers print str Output Hire the top freelance developers In the above example the string is printed in the same way as the information was passed Closing thoughts Python new line Although both methods can be used in Python to add new lines I would recommend using the first method as it is the most commonly accepted method Also given Python has an in built character that facilitates this it is best to utilize it However please feel free to explore and understand how the multiline method works 2021-08-19 12:14:50
海外TECH DEV Community Why Should You Use A VPN? https://dev.to/maximking1/why-should-you-use-a-vpn-45e0 Why Should You Use A VPN A VPN is a Virtual Private Network in many of my guides I will always recommend using a VPN Service for the ultimate online protection But what does it actually do I ve been asked this question many times so I ll explain it here A VPN will essentially masks your IP Address and location when browsing the web When you visit a website in the headers this is like what it requests it will send a host IP which will either be your Home IP if your on your Home Network or Mobile Sim IP Address Every network has its own IP Address it s the internet s way of sending and receiving packets It s like your Home Address so people can send and receive parcels they need the Address When your VPN is active all it does is instead of talking directly to your Router it will forward the request via one of there servers usually this is there nearest one you can in there app and you will look like your sending that packet form there server this will make your IP completely hidden But beware if you don t choose a “safe VPN Service they will be able to see any of your traffic these are the ones I recommend below VyperVPN PaidProtonVPN Paid Free Plan Very LimitedThere are many more out there just these are great ones I recommend For anymore help you can contact me on my discord server 2021-08-19 12:11:38
海外TECH DEV Community Make performance fixes easy to review by showing the "before" and "after" https://dev.to/appland/make-performance-fixes-easy-to-review-by-showing-the-before-and-after-l99 Make performance fixes easy to review by showing the quot before quot and quot after quot Fixing performance issues is often harder than fixing bugs because success is harder to define and demonstrate How fast is fast enough Are you sure that the fix will work in production without testing it there Because development environments are so different than production environments and production contains so much more data bad surprises are common Since there s not usually a definitive test case that proves success your performance changes can be challenging to review Back in March we had an unwelcome performance related surprise of our own in which an “optimized SQL query actually performed much worse in production than we d expected So we ve been working with our community to figure out how to ensure that performance related changes are robust and how to avoid “fixes that are actually regressions It really comes down to showing your work which means recording the real performance and operation of the proposed fix and making that information easily accessible during the code review process What do I mean by real performance and operation When reviewing a performance fix getting a clear presentation of optimized code behavior is half the battle The other half is seeing performance numbers on a realistic data set that are clearly better than the previous version As we discuss the challenges of modern development with our community in forums like this one the need for better tools and methods for tackling performance problems has come up over and over If you aren t familiar with AppMap it s an open source tool that Records code execution at runtime Presents the data in a variety of useful diagrams and analyses It s a useful tool for demonstrating how a performance fix actually works and it can provide assurance that the fix is going to work as intended without other adverse side effects With the recent addition of performance timing data AppMaps are well suited to documenting performance impacting code changes and optimizations Of course having the right tool is just the beginning you also need the right workflow to use it efficiently So we ve been working with our community to present a helpful workflow and in this post we re sharing it more widely If you re interested in this problem please keep reading and respond with your feedback in the comments AppMap is free and open source so you can feel at ease trying this out on any code base Last week we demonstrated how you can use AppMap to verify that a performance issue can be replicated locally identify the root cause and apply a fix Now let s discuss how to demonstrate performance fixes in a pull request so you and your teammates can close tickets faster and more confidently When working on performance it s essential to use realistic timing data Don t guess where the flaw lies Compare the timing data from before and after the performance fix In that way you confirm that you ve really resolved a performance issue Once your code is written share the before and after data in your pull merge request This allows your colleagues to be confident that your changes will work as intended Here s a brief demo that shows how sharing AppMaps can help accelerate your PR review process if you prefer to read vs watch a written version of the demo follows the video In part one I used open source AppMaps to quickly address a performance bug in my Python Django application In this demo I ll show how to use the same AppMaps for documenting the bug and my fix for my team so my code can be reviewed approved and deployed in the shortest time possible To quickly recap the previous demo from a test I recorded an AppMap that visually documented a performance bug in my running code Then I applied a fix re recorded the AppMap from my test and confirmed that my fix addressed the root cause And this is the AppMap of my performance bug before the fix It clearly shows that one of my “meetings endpoints worked as expected while the other one was suffering from the “N problem i e excessive trips to the database caused by imperfect ORM query definition executing queries vs of the other endpoint Let me prepend this AppMap s filename with “before “so I can save it for later And here is a new AppMap recorded from the same test after I applied the fix As you can see the second request now also needs only three trips to the database as well and the time required to execute it shrank to of the original Let me rename this AppMap as well this time I ll prepend its name with “after “ Now I m ready to create a Pull Request with my fix and submit it for review And since the AppMap helped me understand the bug and validate the fix I m going to attach the before and after AppMaps to my PR With the before AppMap I can upload it to the ticket directly or create a Snippet and link it from the request I can also upload it to our file sharing service and add a link there But in this demo I m going to use simple sharing with AppMap Cloud a cloud repository and interactive viewer that makes collaborating with my teammates fast and convenient I open the AppMap click the “Cloud upload icon and confirm the action I can sign in with my GitLab or GitHub account and my AppMap opens in the cloud I can now get the sharing link and add it to my Pull request Let me repeat the same with the “After the fix AppMap Open upload share When my teammates open the Merge request they can instantly open and review my AppMaps and the linked code in their web browser or they can download the AppMaps and open them in their code editor With access to my AppMaps my teammates can quickly observe the behavior of the impacted code before and after my bug fix allowing them to review and merge my changes faster and more confidently Questions or feedback We d love to hear from you reach out in Discord or Twitter 2021-08-19 12:09:32
海外TECH DEV Community Getting Started with ImageEngine and Angular https://dev.to/mnussbaumer/getting-started-with-imageengine-and-angular-pk2 Getting Started with ImageEngine and Angular IntroIn this article we ll go through using imageengine angular package in a sample project to easily take advantage of ImageEngine s CDN and optimisation engine ImageEngine is a super fast CDN that exposes an accessible engine to optimise your app image assets You can optimise your distributions which we ll call Engines in different ways through ImageEngine s dashboard defining settings for your Engine or specific paths in your Engine or through simple query parameters called directives in ImageEngine that allow you to dynamically on the fly execute optimizations to your assets The part we ll be leveraging here through this component is the query parameters although this is mostly hidden from you and you don t have to worry about it to use the component To deliver actual real optimizations to your images you need an ImageEngine Engine nonetheless this package can still be used by itself for enabling lazy loading and preventing Cumulative Layout Shift without one You can check the small app we ll be building and the GitHub repo It s a very basic sample app to show you how to use the component and visualise the different fit types in relation to image size and container size After we write our app you can also try out all other properties of the component by changing the input parameters used The slashed border around the image represents the size you pick from the size select the image inside it is the actual image displayed according to the type of fit you chose Summary IntroSetting up the Angular ProjectDefining our Layout and ContentDeploy to Github PagesCreate ImageEngine EngineConclusion Setting up the Angular ProjectTo follow along you ll need to have Node js NPM that comes with node js and Angular CLI installed The versions used for this tutorial are npm node js v and Angular CLI To deploy on GitHub pages you ll also need a Github account and git installed the version used here was With those installed from the command line run answering N to the prompt for Angular Router and choosing CSS for the styles ng new ie angular samplecd ie angular samplenpm install imageengine angularNow we need to add the imageengine angular module and the Forms module to our app imports Open src app app module ts and make sure it looks like this import NgModule from angular core import BrowserModule from angular platform browser import FormsModule from angular forms import AppComponent from app component import NgxImageengineModule from imageengine angular NgModule declarations AppComponent imports BrowserModule NgxImageengineModule FormsModule providers bootstrap AppComponent export class AppModule FormsModule is included in angular we need it for form bindings and NgxImageengineModule is the module exported from the imageengine angular package Now we re ready to use the image component in our app To save some space we re not going to show here the CSS we ll be using because it has also a style reset sheet included but make sure to copy it over from styles css replace the contents of src styles css with those of that file Defining our Layout and ContentNow let s edit src app app component ts to import Component ChangeDetectorRef AfterViewInit from angular core import IEDirectives IEFit from imageengine imageengine helpers const OPTIONS const FITS IEFit stretch box letterbox cropbox Component selector app root templateUrl app component html styleUrls app component css export class AppComponent implements AfterViewInit image path string assets h lightbox jpeg sizes number OPTIONS size number fits IEFit FITS fit IEFit cropbox width string OPTIONS px height string OPTIONS px src url string null constructor private change detector ChangeDetectorRef ngAfterViewInit void this set src url change size new val number void this size new val this width this sizes new val px this height this sizes new val px this change detector detectChanges this set src url change fit new val IEFit void this fit new val this change detector detectChanges this set src url set src url let img document querySelector ngx ie image if img this src url img getAttribute src this change detector detectChanges We import some type helpers from imageengine imageengine helpers this is a package that is a dependency of imageengine angular and contains the type specifications that the component uses plus some helpers that that package utilises although we re not going to need them here Our component is very simple we have a few properties we ll use to drive our UI some functions to be used as callbacks change size and change fit and a helper set src url to get the url that was computed and in actual use by the component to fetch the asset Let s also edit src app app component html to lt div id main container gt lt div class image holder style minWidth width gt lt div style display flex flex flow row wrap width justify content center align items center gt lt select ngModel size name select size ngModelChange change size event gt lt option value index ngFor let opt of sizes index as index gt opt px x opt px lt option gt lt select gt lt select ngModel fit name select fit ngModelChange change fit event gt lt option value opt ngFor let opt of fits gt opt lt option gt lt select gt lt div gt lt p style margin px auto color white gt Generated URL src url lt p gt lt ngx imageengine wrapper styles width width height height derive size true path image path directives format jpg fit fit compression sharpness gt lt ngx imageengine gt lt div gt lt div gt Besides the normal html and the select s bound to the component properties we have our ngx imageengine component and our focus will be on that We won t cover everything about the component here but in case you re curious just read the package readme as it provides a much more in depth overview of both the properties and details to make the best use of it Here we ll explain some of the most common and useful properties of the component Our web app displays an image inside a rectangle element and allows us to set the size of this container rectangle and the fit we wish for our image the way the image is placed and sized relative to the rectangle sizes we define It also shows us the resulting url generated to fetch that image taking into account the directives we set from ImageEngine s CDN It also allows you to visualise how the type of fit affects the display of the image For the component properties we set wrapper stylesThe component itself renders a wrapper div with an img tag inside of it We can pass specific styles to be inlined both on the wrapper and img tag and classes as well Here we re only defining the width and height according to the properties of our component that reflect the chosen option This will make the wrapper itself assume these dimensions derive sizeWe set this property to true to indicate that we want our component to automatically derive the desired sizes for the image from the size of the wrapper Notice that this would also work if the wrapper was styled through normal CSS in which case we wouldn t need to pass the wrapper styles object pathThe relative path to the image asset directivesThis is an object specifying what directives we want to apply to our image when requesting it from ImageEngine s CDN In this case we re specifically setting the image format to jpg the fit to whatever is selected from the fit select input a compression of interpreted as percentage goes from to defaults to when not specified and sharpness of to add a bit of sharpness to the image All of these could be dynamically set as is the case with fit To see all options you can check the imageengine angular readmeRight now because we didn t specify a host from where to fetch the image the component will fetch it from its relative location on your app If you visit the sample app or the Github Repository you might have noticed that the path includes ie loader images instead of assets but if you re following this tutorial that is irrelevant it s related to the Engine and CDN I m using for this example To recap we set a size for the wrapper we tell our component to derive the image size from the wrapper and we give it a few directives to optimise our image Notice we didn t have to pass width and height directives since we re using derive size Before seeing our app in action let s add the remaining missing things Edit src app app component css to main container width vw min height vh background color transparent padding top px image holder background color transparent min width vw text align center image holder select font size px height px padding px font weight lighter background color black color white Which is just some basic styling for our elements Let s also add our image you can copy it from the GitHub repo Put it in the src assets folder Once that is done we should be able to start our app with from the command line on the root of our project npm run start And then visiting localhost If you now change the settings from the selects you should see how that affects the image and the url If you change on the component itself the directives being passed you will also see them reflected on the url and on the image One thing to take into consideration is the fact that we re using device pixel ratio conversions so if you re visualising the app in a monitor with higher resolution than like a retina display the sizes you see being encoded in the url will respect that and get the correct dimensions for the intrinsic size you want to display You can turn that off and there s other properties as well to help you make the most out of ImageEngine easily This also means that some images might be requested at higher dimensions than your original images have When this is the case ImageEngine won t apply crop directives nor upscale the image and instead return the image in its original size with other non size related directives applied The component will take care of displaying them according to the chosen fit without you needing to do anything You can see this by choosing x as the size and cropbox fit The original image is smaller in size than that so ImageEngine will return it in its original dimensions without the cropbox factor we specified but our component still displays it as the cropbox would look because the original size is smaller than the final intrinsic size you might notice the image loose some quality You ll also see if you change the size to a bigger one and then back to a smaller one that the component changes from the smaller to the bigger one but then keeps the bigger one as long as it s bigger than the new selection This can be turned off by using the Input force size recalculation with true It defaults to false because in practice it means that if you have responsive and or derive size on if the sizes change to a smaller one instead of asking for a new image in those smaller sizes that would need to be transferred it keeps the sizing that s bigger meaning it uses the already fetched image Nonetheless if you re changing ratios between breakpoints for instance and using cropbox you might actually want to force a refetch in those cases you can turn that flag on but in almost every case it s better more performant to just keep force size recalculation as false One last note regarding the directives the component supports Setting the letterbox colouring isn t possible directly through the component but is easily achievable by just giving a background color to the wrapper element and using the box fit method Deploy to Github PagesAngular has support for deploying on GitHub pages with the help of a package named angular cli ghpages We won t cover how to create a GitHub repo but once you have that add your repo as a remote git remote add origin git github com lt YOUR USERNAME gt lt THE NAME OF YOUR REPO gt gitAnd substitute the values between lt gt by your username and the name you gave the repo Now let s add the angular cli ghpages with ng add angular cli ghpagesFollowed by ng deploy base href lt THE NAME OF YOUR REPO gt if you have a custom domain associated with your GitHub pages you need to add the flag cname to the command like cname your domain com Now you should be able to check the website online from Github Pages the address should be You can see that it works even without an host Engine obviously it won t do any real optimization to your assets until we add one Create ImageEngine EngineSince now we have our resources online we are able to create a CDN distribution for it with ImageEngine You can sign up for a free trial of ImageEngine by following the instructions on the following video and using the address of your newly created website imageengine ioOnce that is done you should have an ImageEngine delivery address We ll now add that to our component and re deploy with the delivery address set To do that change your component to have the property host set to whatever is the address you got previously lt ngx imageengine wrapper styles width width height height derive size true path image path directives format jpg fit fit compression sharpness host gt lt ngx imageengine gt if you have a domain and are running Github Pages with HTTPS then you need to enable it on your Image Engine settings as well Notice we put a forward slash at the end of the host address we just added This is because the paths to work in Github Pages at least with cname and base href need to be absent of leading slashes to be relative but we need it when prepending the domain In this case it s simpler to add it to the host address And run again ng deploy base href lt THE NAME OF YOUR REPO gt ConclusionAnd that s it now you can see that the generated URL includes the domain Because it works without an Engine as well without optimising the images obviously you can run and test locally your app assert on the generated urls and confirm it s working as expected besides actually seeing how the images will look like You can do the same in a staging environment without setting up multiple Engine s to deal with different origins To make it more production ready you would probably add an environment variable to control the host value so that when building for production that is set and the ImageEngine CDN used and when running locally it s not As you can see it s quite easy to add advanced image optimisations to your website Exploring the potential of ImageEngine s CDN and Optimization Engine allow you to drastically reduce your image s payloads leading to a much leaner and snappier experience for your end users With the aid of this component you can easily create fully maintainable layouts and designs that only require editing of your CSS styles to be updated when they change provide automatically the exact best fit and size according to that styling prevent Cumulative Layout Shift have responsiveness to screen orientation size changes lazy loading and are aware of your end user screen pixel ratio Hope you find it useful 2021-08-19 12:01:01
Apple AppleInsider - Frontpage News 'Civilization VI' New Frontier Pass coming to iOS August 24 https://appleinsider.com/articles/21/08/19/civilization-vi-new-frontier-pass-coming-to-ios-august-24?utm_medium=rss x Civilization VI x New Frontier Pass coming to iOS August After a year with no updates the iOS and iPadOS version of Civilization VI is getting a major content update with the New Frontier Pass expansion Civilization VI New Frontier Pass coming August to iOSThe New Frontier Pass for Civilization VI adds eight new civilizations and nine new leaders to the base game While the expansion has rolled out to PC and Console versions this is the first time it is coming to iOS Read more 2021-08-19 12:55:32
Apple AppleInsider - Frontpage News iPad mini design revealed in purported case mold leak https://appleinsider.com/articles/21/08/19/ipad-mini-design-revealed-in-purported-case-mold-leak?utm_medium=rss iPad mini design revealed in purported case mold leakWhat s claimed to be a case mold for the forthcoming iPad mini redesign appears to confirm expectation of thinner bezels and Touch ID in the power button Claimed iPad mini case mold leak Source Techordo Following recent rumors of an iPad mini refresh and previous claims about its design a new case mold showing the physical size and shape has reportedly been leaked Read more 2021-08-19 12:49:42
Apple AppleInsider - Frontpage News Apple Card is 'bright spot' in credit cards, says J.D. Power rankings https://appleinsider.com/articles/21/08/19/apple-card-is-bright-spot-in-credit-cards-says-jd-power-rankings?utm_medium=rss Apple Card is x bright spot x in credit cards says J D Power rankingsGoldman Sachs and Apple s Apple Card is number in a J D Power ranking of what is described as the midsized credit card market Apple Card was launched in In a year in which J D Power says most credit cards missed the mark in supporting users during the coronavirus pandemic it also says that Apple Card was a bright spot In a survey conducted between September and June credit cards from mid sized issuers were assigned an overall score Read more 2021-08-19 12:33:53
Apple AppleInsider - Frontpage News Civil rights groups worldwide ask Apple to drop CSAM plans https://appleinsider.com/articles/21/08/19/worldwide-civil-rights-groups-ask-apple-to-drop-csam-plans?utm_medium=rss Civil rights groups worldwide ask Apple to drop CSAM plansMore than civil rights groups have sent an open letter to Apple asking the company to abandon its child safety plans in Messages and Photos fearing expansion of the technology by governments Apple s new child protection featureFollowing the German government s description of Apple s Child Sexual Abuse Material plans as surveillance organizations around the world have joined the protest Groups including US based ones have written to CEO Tim Cook Read more 2021-08-19 12:39:11
Apple AppleInsider - Frontpage News Thieves use Apple Watch to track & steal $500K in drug runner cash https://appleinsider.com/articles/21/08/18/thieves-uses-apple-watch-to-track-steal-500k-in-drug-runner-cash?utm_medium=rss Thieves use Apple Watch to track amp steal K in drug runner cashA band of New York robbers reportedly used an Apple Watch to track down a drug runner and steal in cash according to federal prosecutors Credit The New York PostThe seven person crew of thieves based in the Hudson Valley pulled off the caper in January The alleged leader of the group year old Darren Lindsay purchased an Apple Watch and linked it to his AT amp T account to pull off the scheme according to papers filed by prosecutors and seen by The New York Post Read more 2021-08-19 12:04:10
海外TECH Engadget Amazon is reportedly planning to open mini department stores https://www.engadget.com/amazon-department-stores-122954800.html?src=rss Amazon is reportedly planning to open mini department storesAmazon is preparing to increase its brick and mortar footprint in a big way The retailer plans to open several large physical locations in the US akin to department stores according to anonymous sources cited by The Wall Street Journal The new stores ーthe first of which will come to Ohio and California ーwill sell clothing household items and electronics from quot top consumer brands quot Obviously shoppers can also expect to run into Amazon s own brand products too While the sites are tipped to be around the third of the size of a typical department store at square feet they ll still be much larger than Amazon s other physical locations The move sees the company expanding into an area it originally disrupted as it grew into an all in one online shopping destination nbsp With their sales already plummeting the pandemic sealed the fate of several high profile department stores The likes of J C Penney and Neiman Marcus Group have filed for bankruptcy along with other big names in the sector Though some were thrown a lifeline when they managed to attract new owners nbsp Amazon on the other hand has seen its fortunes skyrocket during the pandemic as it profited from an increasing shift toward e commerce Its booming business even helping to bankroll founder Jeff Bezos trip into space Amazon s move into physical retail predates the virus however The company started with brick and mortar bookstores back in later acquiring Whole Foods for billion in More recently it opened cashierless Amazon Go stores in the US and UK Not to mention its highly curated Amazon star stores and Amazon Pop Ups inside malls The larger stores are apparently viewed as a way of letting shoppers try before they buy which is particularly useful for things like apparel That s an area where Amazon has historically struggled As the WSJ notes the only high fashion label on its online store is Oscar de la Renta It also lost a major seller in Nike in which decided to go it alone in e commerce ーa move that has paid off for the sneaker company Amazon s department stores would also allow it to showcase its range of electronics from its Fire TVs and tablets to Echo speakers to its Ring home security range and even its Luna cloud gaming service Notably big box retailers have shown that emboldened shoppers are returning to stores Both Walmart and Target recently smashed estimates in their respective second quarters as sales rose across most categories 2021-08-19 12:29:54
海外TECH Engadget Bird unveils a $2,299 electric bike you can own https://www.engadget.com/bird-electric-bike-you-can-buy-120047459.html?src=rss Bird unveils a electric bike you can ownWhile Bird is mostly known for its rental scooters it expanded its electric transportation offerings back in June when it introduced a bike sharing service Now the company is giving those who want electric bikes of their own a new option to choose from It has launched a new product called Bird Bike which people can purchase right now for US The electric bike has a Bafang rear hub motor with miles of range and a volt removable battery made of LG cells for easy charging In the UK and the European Union owners will have access to watts of continuous rated power in line with local regulations Meanwhile users in the US will have access to watts of electric support The bike has a pedal assist speed of mph and has a thumb throttle which can give riders an extra burst of acceleration to help them take on difficult inclines nbsp BirdIt s also equipped with an LCD display showing the rider s speed battery charge assist information and other details Other features include a commercial grade aluminum alloy frame puncture resistant tires and Bluetooth connectivity with the Bird app allowing riders to easily switch their vehicle lights on and off and to view their battery range and miles ridden The Bird Bike comes in two types One has a step through frame while the other has a step over frame It also comes in two colors namely Stealth Black and Gravity Gray Bird is selling limited quantities of the e bike right now on its website but it will be available more broadly from retailers in the US and Europe this fall nbsp Bird 2021-08-19 12:00:47
ニュース BBC News - Home Chip shortage: Toyota to cut global production by 40% https://www.bbc.co.uk/news/business-58266794 global 2021-08-19 12:25:57
ニュース BBC News - Home Briton describes airport dash to flee Kabul https://www.bbc.co.uk/news/uk-58266554 taliban 2021-08-19 12:47:40
LifeHuck ライフハッカー[日本版] あのロボット掃除機が、プロジェクターが安い【Amazonタイムセール祭り】QOL向上家電 https://www.lifehacker.jp/2021/08/237213amazon-timesale-homeappliances.html amazon 2021-08-19 21:30:00
北海道 北海道新聞 後志管内18人感染 町村部、3カ月ぶり2桁 新型コロナ https://www.hokkaido-np.co.jp/article/579966/ 新型コロナウイルス 2021-08-19 21:18:00
北海道 北海道新聞 敷地内薬局の設置検討 小樽市立病院 建物一部を事務室に 薬剤師会は反対、協議中 https://www.hokkaido-np.co.jp/article/579965/ 小樽市立病院 2021-08-19 21:17:00
北海道 北海道新聞 大阪維新の会、元市議を公認 サウナ問題の池田市長選で https://www.hokkaido-np.co.jp/article/579948/ 大阪維新の会 2021-08-19 21:03:31
北海道 北海道新聞 タリバン「団結」呼び掛け イスラム統治、民主制を否定 https://www.hokkaido-np.co.jp/article/579928/ 統治 2021-08-19 21:03:01
北海道 北海道新聞 パラ交流、95%が中止や変更 障害理解の浸透に懸念も https://www.hokkaido-np.co.jp/article/579964/ 東京パラリンピック 2021-08-19 21:17:00
北海道 北海道新聞 少量栽培野菜の販路拡大へ 音更の生産者直売所 詰め合わせセット通販 https://www.hokkaido-np.co.jp/article/579962/ 詰め合わせ 2021-08-19 21:15:00
北海道 北海道新聞 金魚祭り2年ぶり復活 月形温泉ホテルで29日 小屋焼失、CFで飼育再開 https://www.hokkaido-np.co.jp/article/579890/ 温泉ホテル 2021-08-19 21:12:06
北海道 北海道新聞 自宅療養発生に危機感 函館市医師会・本間会長会見の一問一答 https://www.hokkaido-np.co.jp/article/579958/ 一問一答 2021-08-19 21:09:00
北海道 北海道新聞 「ポーランドで代表を目指す」 亡命の陸上ベラルーシ選手 https://www.hokkaido-np.co.jp/article/579957/ 東京五輪 2021-08-19 21:09:00
北海道 北海道新聞 函館もコロナ病床埋まる恐れ 「増床しても楽観できぬ」 市医師会・本間会長会見 https://www.hokkaido-np.co.jp/article/579956/ 新型コロナウイルス 2021-08-19 21:06:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

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

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