投稿時間:2023-01-11 03:18:04 RSSフィード2023-01-11 03:00 分まとめ(23件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Big Data Blog Accelerate orchestration of an ELT process using AWS Step Functions and Amazon Redshift Data API https://aws.amazon.com/blogs/big-data/accelerate-orchestration-of-an-elt-process-using-aws-step-functions-and-amazon-redshift-data-api/ Accelerate orchestration of an ELT process using AWS Step Functions and Amazon Redshift Data APIExtract Load and Transform ELT is a modern design strategy where raw data is first loaded into the data warehouse and then transformed with familiar Structured Query Language SQL semantics leveraging the power of massively parallel processing MPP architecture of the data warehouse When you use an ELT pattern you can also use your existing … 2023-01-10 17:42:15
AWS AWS Big Data Blog Add your own libraries and application dependencies to Spark and Hive on Amazon EMR Serverless with custom images https://aws.amazon.com/blogs/big-data/add-your-own-libraries-and-application-dependencies-to-spark-and-hive-on-amazon-emr-serverless-with-custom-images/ Add your own libraries and application dependencies to Spark and Hive on Amazon EMR Serverless with custom imagesAmazon EMR Serverless allows you to run open source big data frameworks such as Apache Spark and Apache Hive without managing clusters and servers Many customers who run Spark and Hive applications want to add their own libraries and dependencies to the application runtime For example you may want to add popular open source extensions to Spark … 2023-01-10 17:38:18
AWS AWS Machine Learning Blog Best practices for load testing Amazon SageMaker real-time inference endpoints https://aws.amazon.com/blogs/machine-learning/best-practices-for-load-testing-amazon-sagemaker-real-time-inference-endpoints/ Best practices for load testing Amazon SageMaker real time inference endpointsAmazon SageMaker is a fully managed machine learning ML service With SageMaker data scientists and developers can quickly and easily build and train ML models and then directly deploy them into a production ready hosted environment It provides an integrated Jupyter authoring notebook instance for easy access to your data sources for exploration and analysis so … 2023-01-10 17:35:22
AWS AWS - Webinar Channel Analytics in 15: What's New for Builders on AWS in 2023- AWS Analytics in 15 https://www.youtube.com/watch?v=e_wIQ-XynFI Analytics in What x s New for Builders on AWS in AWS Analytics in Data is the cornerstone of decision making in any data driven organization Join this session to learn what s new for builders in and how you can build a modern data strategy one that breaks down silos puts data in the hands of everyone in the organization in accordance with governance and compliance regulations dictated by your organization Learning Objectives Objective See what s new for builders in Objective Learn best practices for building a modern data architecture Objective Understand how to add governance to your data strategy To learn more about the services featured in this talk please visit To download a copy of the slide deck from this webinar visit 2023-01-10 17:15:01
python Pythonタグが付けられた新着投稿 - Qiita CSV形式の行列を読み込むプログラム(Python) https://qiita.com/persim/items/d2f6a4f313a13e4b92b8 記事 2023-01-11 02:45:03
AWS AWSタグが付けられた新着投稿 - Qiita Auto Scaling グループの起動テンプレートでの spot インスタンスの嵌り https://qiita.com/intrajp/items/ed1b71ac4faa151d1bcc autoscaling 2023-01-11 02:33:22
海外TECH Ars Technica Here’s where traffic sucked the most in 2022 https://arstechnica.com/?p=1908845 chicago 2023-01-10 17:11:11
海外TECH MakeUseOf 10 Mistakes You're Making While Browsing the Web https://www.makeuseof.com/tag/7-mistakes-youre-making-while-browsing-the-web/ Mistakes You x re Making While Browsing the WebMost of us spend hours on the Internet every day As it turns out you may be sabotaging your own web browsing experience with a few simple mistakes 2023-01-10 17:30:15
海外TECH MakeUseOf How to Find Downloaded Files and Photos on an iPhone https://www.makeuseof.com/how-to-find-downloads-on-iphone/ photos 2023-01-10 17:30:15
海外TECH MakeUseOf How to Fix the “Bootstrapper Has Stopped Working” Error in Windows https://www.makeuseof.com/bootstrapper-has-stopped-working-error-windows/ office 2023-01-10 17:15:15
海外TECH DEV Community Mergulhos profundos ou investigando sistemas https://dev.to/pedrokiefer/mergulhos-profundos-ou-investigando-sistemas-314m Mergulhos profundos ou investigando sistemasEu sempre gostei de investigar coisas qualquer coisa Quando criança queria saber como os brinquedos funcionavam desmontava e montava os carrinhos bicicletas aparelhos de som computadores Vivia tentando entender as partes mecânicas depois os circuitos e eventualmente os softwares Cresci com isso algo muito pessoal e sempre uma grande diversão para mim Nem todas as pessoas curtem inclusive talvez a exceção sejam as pessoas que gostam de entender tudo então não se sinta culpado ou mal por não gostar ou não querer fazer esse tipo de investigação chame a pessoa que vocêconhece e sabe que gosta disso para te ajudar vai ser um prazer para ela Pra mim fazer esse tipo de trabalho étão natural e divertido que às vezes esqueço que também étrabalho Toda essa introdução para chegarmos no assunto que quero contar uma investigação para otimizar custos na AWS Mas não ésósobre isso éuma tentativa minha de mostrar que investigar coisas não élinear e não tem fórmula mágica Bom vamos ao causo Temos uma conta na AWS que rodam alguns sistemas e o custo de NAT Gateway estava um tanto elevado NAT Gateway éa peça mágica que traduz as conexões que vem de uma rede privada para uma rede pública ie a internet Toda a rede privada tem isso na sua casa éo roteador que faz esse papel na AWS temos o NAT Gateway como serviço gerenciado pagamos e a AWS resolve os problemas de escala mantém o sistema atualizado etc ーtambém dápra fazer direto numa EC mas não éo objetivo aqui Outra peça legal que a AWS fornece são os VPC Endpoints que permite conectar serviços de múltiplas contas sem integrar a rede ou conectar diretamente com serviços da AWS que não deixam de ser outras contas sóque gerenciadas pela própria AWS A rede em questão sótinha NAT Gateway e nenhum VPC Endpoint então todos os serviços da AWS que estavam em uso passavam pelo gateway para conseguir chegar na internet e no serviço Funciona mas tem um custo elevado perto do custo de um VPC Endpoint usd GB contra usd GB do VPC Endpoint Investiguei rapidamente quais os serviços estavam em uso na conta SQS S SNS EC talvez os serviços mais comuns da AWS Criei o VPC Endpoint para o SQS e magicamente o tráfego da NAT Gateway despencou ーbateu aquele momento de pânico seráque fiz algo tão errado assim Mas não foi sóolhar as métricas do endpoint que o tráfego estava todo lá ufa Sóisso jádeu uma ótima economia mas não tava feliz e tinha sido fácil demais zero aprendizados Resolvi investigar um pouco mais pra isso fui atrás de outro serviço da AWS VPC Flow Logs Habilitando isso dentro de um VPC temos acesso a todas as conexões que existem na rede de onde elas surgem para onde vão quando começaram quantos bytes trafegaram em cada conexão Uma ferramenta ótima para investigar redes porém pode ter um custo elevado dependendo da rede Para evitar surpresas liguei o serviço coletei dados por alguns minutos e desliguei Cada arquivo gerado tinha cerca de Mb compactados com algo em torno de milhão de entradas Hora de trazer a ferramenta de análise de dados que sempre esqueço como usar obrigado Google por me salvar pandas Primeiro passo era carregar um tanto dos dados e olhar o formato deles temos várias colunas IP de origem IP de destino porta de origem instância serviço da AWS IP de origem do pacote Todas as informações necessárias para identificar os fluxos de dados A documentação da AWS tem alguns exemplos de fluxos e seus significados com isso jásabia qual seria o primeiro passo como não tinha interesse em saber de onde tinha vindo o pacote sóque ele tinha saído de um NAT Gateway e estava indo para a internet então filtrei os dados com o IP interno do gateway Agora fiquei com bem menos linhas para trabalhar mas ainda assim um volume grande para olhar manualmente Agrupei os IPs de destino filtrei alguns que eu jáconhecia e não tinha interesse Mas ainda estava com um monte de IPs que não diziam muita coisa para mim Duas ferramentas vieram a mente curl e host A primeira ferramenta faz chamadas HTTP e a segunda resolve DNS e DNS Reverso Tentei a segunda ferramente primeiro e não tive muito sucesso sóindicava que era uma máquina da AWS isso eu jásabia AWS édona do bloco host in addr arpa domain name pointer ec compute amazonaws com Isso não me ajuda a descobrir qual o sistema então vamos para o curl Mas como HTTP vai me ajudar a identificar um IP Bom estamos em maioria dos sistemas tem um certificado e trabalham com HTTPS No certicado sempre temos o nome comum que aquele sistema responde curl v Server certificate subject CN queue amazonaws com Ótimo agora eu sei que o IP éo SQS Opa Como assim Eu criei um VPC Endpoint para ele não deveria passar mais pelo NAT Gateway Fiz algo errado o que estáacontecendo Muitas perguntas mas tinha mais serviços para identificar e usar host e curl manualmente não escala Hora de escrever um código que imite o funcionamento das ferramentas em python para passar a coluna do DataFrame e deixar trabalhando Algumas tentativas depois tenho o que eu preciso rodo em cima dos IPs de destino de tabela agrupo pelo nome encontrado e táláem primeiro lugar o SQS mas também tem outros serviços da AWS Vejo quais fazem sentido adicionar VPC Endpoints crio eles e vou ser feliz na próxima tarefa Não consigo preciso saber por que o SQS continua passando no Gateway Antes disso dou uma olhada nos gráficos e os VPC Endpoints novos fizeram sentido e vão realmente diminuir os custos Posso voltar a tentar entender o que aconteceu com o SQS Olho o nome queue amazonaws com e vejo que édiferente do sqs lt region gt amazonaws com que estou acostumado a ver olho a documentação da AWS e entendo o problema temos aplicações usando o endereço legado do serviço Uma chuva de perguntas passa pela minha cabeça Quais aplicações Onde elas estão Quais linguagens Seráque são sistemas legados que queremos desligar Primeiro passo éinvestigar se temos algum repositório com código chamando direto esse endereço Rápida pesquisa no sistema de versionamento e nada relevante então hora de fazer uma análise mais profunda Enquanto levantava a relação de serviços acessados játinha gerado uma lista de nome e IPs então sófiltrei a lista e obtive todos os IPs que atendem queue amazonaws com sim são vários éum serviço da AWS com altíssima disponibilidade Agora posso filtrar os flows procurando os endereços de origem que chegam em algum dos IPs dessa lista o que resultou numa pequena lista de IPs internos ーalgo em torno de endereços Filtro as instâncias EC que temos rodando com essa lista de IPs internos e surpresa são todos nós de um cluster kubernetes É não vai ser tão fácil encontrar a aplicação penso eu enquanto procuro como listar os pods de um dado nódo cluster Mais uma linha de comando gigante e obtenho a lista de aplicações e são muitas Tento alguns filtros na linha de comando mesmo cat cut sort unique c vejo alguns sistemas que rodam em todos os nós coisas padrão do kube umas duas aplicações grandes e uma lista enorme de aplicações pequenas Vou atrás do código fonte das maiores aplicações e nada fora do comum e nem usam SQS Vou seguindo a lista mas sem muita esperança de encontrar uma aplicação só Um padrão começa a surgir muitas aplicações são escritas em python mas isso não me diz muito ainda Nesse momento quase desisto da investigação versão do boto biblioteca python para acesso aos serviços da AWS era relativamente nova em todos os projetos nada com cara de sistemas legados e sem manutenção parecia um beco sem saída então voltei atrás mas retive algumas informações python endereços legados SQS Peguei as poucas informações que tinha e voltei pro Google mesmo sem esperanças de achar algo Eis que encontro uma issue no Github do botocore biblioteca que faz o grosso das coisas para a boto e táali o problema reportado em A biblioteca gera e usa os endereços antigos por causa de alguma incompatibilidade do python que estáhámuitos anos descontinuado Cheguei na solução não tem solução Mas não fiquei feliz com isso e fui olhar issues relacionadas algumas duplicadas outras com mais informações e encontrei outra essa tinha um pull request de ºde novembro e falava que o problema estava resolvido na botocore gt Vou direto pro terminal instalo a biblioteca e testo Problema resolvido Provavelmente eu não precisava ter olhado para todas as aplicações que estavam rodando ーmesmo que por amostragem como eu fiz uma pesquisa mais certeira poderia ter resolvido meu problema de forma mais rápida Mas como eu poderia ser mais certeiro se não sabia o que estava procurando Depois de tantas idas e vindas tudo o que me restava fazer era comunicar os times que as bibliotecas botocore e boto deveriam ser atualizadas para a última versão e que isso ajudaria na redução de custos Foi uma grande montanha russa cheia de voltas mas no final deu tudo certo Em outros casos simplesmente não conseguimos achar a causa seja por falta de tempo ie a causa raiz não vale o esforço da investigação ou por falta de conhecimento do problema que estamos lidando Sempre peça ajuda Um outro par de olhos ou orelhas ajudam muito Às vezes sóde explicar em qual parede chegamos e como chegamos lájános ajuda a pensarmos em outras soluções para o problema   Parte do código python utilizado na análise 2023-01-10 17:29:28
海外TECH DEV Community How to Create a Stunning GitHub Readme Profile https://dev.to/patilganesh1010/how-to-create-a-stunning-github-readme-profile-5gg0 How to Create a Stunning GitHub Readme ProfileHow to Create an Amazing Github Readme Profile IntroductionHello Tech Geeks Welcome to the first article of this series where I m going to share my git amp github learning and best resources as well as practices for developers In today s tech world Github is a portfolio for developers Everything you can mention on github your profile such as projects collaboration projects development statistics and many more As a developer you have to know how about the version control system Git is the current choice of many developers as a VCS We ll learn more about Git amp GitHub in an upcoming article now we are going to learn how to optimize a github profile in the best way In this article I will be sharing the finest resources and courses to make your github profile stand out from the crowd This contains everything you need to optimize your github profile as a beginner So Let s get started Let s BeginTo optimize your GitHub profile you have to create a github repository with your github username Create a repo with a github username It s a special repository that you can use to add README md to your GitHub profile Make sure it s public and initialize it with a README to get started Add the license to it That s it Now you created a repo with a github username and it will appear on your profile as a readme MD file The MD file extension stands for markdown similar to HTML GitHub Readme GeneratorsNow your GitHub readme file is completely empty and we are going to create a profile The generators help you to create an awesome github profile but due to generators optimization you have some limitations But as a beginner you will able to create a standard profile with online generators Here is the list that contains readme generators for you to create a profile Github Profile Generator by Rahul JainProfile GeneratorReadme soProfile GeneratorAviyel Readme GeneratorThese are the most useful and easiest generators to create a github profile with prebuilt data The above generators include everything from tech stack to every social media handle to add to your profile Now with the help of these generators you can generate markdown tags and simply copy and paste them to your github readme file but wait if you want to customize more to the profile definitely check the below course Github Profile Customization CourseGithub profile customization course developed by Eddie jaoude for free I personally suggest taking this course which is absolutely free for everyone with complete guidance from Eddie A complete Github profile customization course will help you to understand how actual markdown works and how you can customize your profile the way you want Thi course contains everything from how to create a readme repository on github to github actions WrapupFinally in the end we created a stunning GitHub profile with the help of generators and Eddie s course A github profile customization is a never ending process because you have to update your profile regularly as a developer Github profile optimization helps a lot in terms of opportunities and remote jobs because its works like a portfolio for you If you learn something exciting today then don t forget to share it with your friend Share it on Twitter 2023-01-10 17:27:56
海外TECH DEV Community Rendering NativeScript Angular Templates and Components into images https://dev.to/valorsoftware/rendering-nativescript-angular-templates-and-components-into-images-56bk Rendering NativeScript Angular Templates and Components into imagesWhile working on a NativeScript Angular app with millions of downloads across platforms I faced a tricky problem I needed to generate an image that the user could share Usually this can be done quite easily if you this view is visible in your application where you could just render it to an image in fact it has been done before The difficult part here was that this view did not show anywhere in the app and even had special layout constraints Taking a view screenshotTaking a screenshot of a view is an easy task On android it s a simple case of create a bitmap attaching it to a canvas and then drawing the view directly on that canvas export function renderToImageSource hostView View ImageSource const bitmap android graphics Bitmap createBitmap hostView android getWidth hostView android getHeight android graphics Bitmap Config ARGB const canvas new android graphics Canvas bitmap ensure we start with a blank transparent canvas canvas drawARGB hostView android draw canvas return new ImageSource bitmap On the iOS side we have a very similar concept We begin the image context and then we render the view in that context export function renderToImageSource hostView View ImageSource UIGraphicsBeginImageContextWithOptions CGSizeMake hostView ios frame size width hostView ios frame size height false Screen mainScreen scale hostView ios as UIView layer renderInContext UIGraphicsGetCurrentContext const image UIGraphicsGetImageFromCurrentImageContext UIGraphicsEndImageContext return new ImageSource image There it is Taking a screenshot of any NativeScript view with a couple of lines of code Rendering a view detached from the view hierarchyNow let s take it one step further Let s use some clever NativeScript magic and create our layout completely detached from the native view tree export function loadViewInBackground view View void get the context android only const context isAndroid Utils android getApplicationContext now create the native view and setup the styles CSS as if it were a root view view setupAsRootView context load the view to apply all the native properties view callLoaded That should do it Now let s just call that function and…oh…Of course This view has no size So we need to measure and layout it That s simple enough export function measureAndLayout hostView View width number height number const dpWidth width Utils layout toDevicePixels width const dpHeight height Utils layout toDevicePixels height const infinity Utils layout makeMeasureSpec Utils layout UNSPECIFIED hostView measure width Utils layout makeMeasureSpec dpWidth Utils layout EXACTLY infinity height Utils layout makeMeasureSpec dpHeight Utils layout EXACTLY infinity hostView layout hostView getMeasuredWidth hostView getMeasuredHeight Now this view should render exactly at the width and height that I require Let s give it a try It worked Turns out it wasn t as difficult as I thought Now that we re ready to go let s add the styling Let s keep the text intact but add some styling We need some border radius and some margins view shot border radius border width border color red margin Now run that through our render and…Where did my margins go Well it turns out that on both platforms the parent layout is responsible for the children s positioning and margins are just some extra positioning information given to the parent Another quick fix then just wrap the view with another layout export function loadViewInBackground view View View get the context android only const context isAndroid Utils android getApplicationContext create a host view to ensure we re preserving margins const hostView new GridLayout hostView addChild view now create the native view and setup the styles CSS as if it were a root view hostView setupAsRootView context load the view to apply all the native properties hostView callLoaded return hostView And the result Success We can now keep adding the remainder like an image The image has to be downloaded so let s add a delay between creating the view and screenshotting it we can cache it later And…oh no not again Attaching the view to the view hierarchyAfter digging through the native source code I realized that on Android a lot of views like image will only fully render when they re attached to the window so how do we attach it to the view hierarchy without showing it and without affecting the layout at all The main function of a ViewGroup is to layout the views in a particular way So first let s create a view that will not do any layout NativeClassclass DummyViewGroup extends android view ViewGroup constructor context android content Context super context return global native this public onMeasure void this setMeasuredDimension public onLayout void class ContentViewDummy extends ContentView createNativeView return new DummyViewGroup this context Now we just need to make sure that it s visibility is set to collapse and use a very convenient method from the AppCompatActivity addContentView to add the view to the root of the activity essentially adding it to the window but completely invisible export function loadViewInBackground view View const hiddenHost new ContentViewDummy const hostView new GridLayout use a host view to ensure margins are respected hiddenHost content hostView hiddenHost visibility collapse hostView addChild view hiddenHost setupAsRootView Utils android getApplicationContext hiddenHost callLoaded Application android startActivity addContentView hiddenHost android new android view ViewGroup LayoutParams return hiddenHost hostView And we re done Integrating with AngularSo far we have only dealt with NativeScript views but what we really care is how we generate these views from Angular components and templates So here s how import ComponentRef inject Injectable Injector TemplateRef Type ViewContainerRef from angular core import generateNativeScriptView isDetachedElement isInvisibleNode NgView NgViewRef from nativescript angular import ContentView ImageSource View ViewBase from nativescript core import disposeBackgroundView loadViewInBackground measureAndLayout renderToImageSource from valor nativescript view shot export interface DrawableOptions lt T unknown gt target width of the view and image in dip If not specified the measured width of the view will be used width number target height of the view and image in dip If not specified the measured height of the view will be used height number how much should we delay the rendering of the view into the image This is useful if you want to wait for an image to load before rendering the view If using a function it will be called with the NgViewRef as the first argument The NgViewRef can be used to get the EmbeddedViewRef ComponentRef and the NativeScript views This is useful as you can fire an event in your views when the view is ready and then complete the promise to finish rendering to image delay number viewRef NgViewRef lt T gt gt Promise lt void gt The logical host of the view This is used to specify where in the DOM this view should lie The practical use of this is if you want the view to inherit CSS styles from a parent If this is not specified the view will be handled as a root view meaning no ancestor styles will be applied similar to dropping the view in app component html logicalHost ViewBase ViewContainerRef Injectable providedIn root export class ViewShotService private myInjector inject Injector async captureInBackground lt T gt type Type lt T gt TemplateRef lt T gt width height delay logicalHost DrawableOptions lt T gt Promise lt ImageSource gt use nativescript angular helper to create a view const ngView generateNativeScriptView type injector logicalHost instanceof ViewContainerRef logicalHost injector this myInjector keepNativeViewAttached true detect changes on the component if ngView ref instanceof ComponentRef ngView ref changeDetectorRef detectChanges else ngView ref detectChanges currently generateNativeScriptView will generate the view wrapped in a ContentView this is a minor bug that should be fixed in a future version on nativescript angular so let s add a failsafe here to remove the parent if it exists if ngView view parent if ngView view parent instanceof ContentView ngView view parent content null else ngView view parent removeView ngView view use the method that loads a view in the background const drawableViews loadViewInBackground ngView view host const hostView drawableViews do the measuring of the hostView measureAndLayout hostView width height this delay is either a function or time in ms which is useful for letting async views load or animate if typeof delay function typeof delay number amp amp delay gt if typeof delay number await new Promise lt void gt resolve gt setTimeout gt resolve delay else await delay ngView if ngView ref instanceof ComponentRef ngView ref changeDetectorRef detectChanges else ngView ref detectChanges do a final measure after the last changes measureAndLayout hostView width height call the render function const result renderToImageSource hostView dispose views and component disposeBackgroundView drawableViews ngView ref destroy return result unchanged from the original implementation captureRenderedView view View return renderToImageSource view ConclusionHopefully this gave you an insight on how the native platforms display their views and how NativeScript can be used in advanced view hierarchy composition The NativeScript plugin has been released as valor nativescript view shot and you can check its source code in our shared plugin workspace You can now enjoy creating views in the background for either showing saving or sharing them in social media like the following mockup 2023-01-10 17:16:43
海外TECH DEV Community Watch Area and Renderers https://dev.to/codenameone/watch-area-and-renderers-2mi4 Watch Area and RenderersThis is it The debugging book is now live I would really appreciate reviews and feedback I also finished recording and editing the entire course There are total videos which total in hours I also recorded additional videos for the two other free courses for beginners and for modern Java So keep an eye on those RenderersIn today s video we discuss one of my favorite obscure IDE features renderers Very few people are aware of them I explained them in the past but I feel I didn t properly explain why they are so much better than any other alternative This time I think I got the explanation right If you work with JPA or any elaborate API you should check this out I think the demo is revolutionary If you provide a complex library to developers this can also be an amazing tool TranscriptWelcome back to the sixth part of debugging at scale where the bugs come to die In this section we discuss the watch area The watch is one of the most important areas in the debugging process Yet we don t give it nearly as much attention as we should In this segment we ll discuss a few of the powerful things we can do in the watch area and how we can extend it to support some fantastic capabilities Mute RenderersLet s start with mute renderers which lets us improve the performance of the watch area Before we discuss that I d like to talk about the watch area itself This is the watch area In it we can see most of the visible variables for the current stack frame and their values We can expand entries within the watch area Every variable value or expression we have in the watch is an entry We can add arbitrary elements to the watch and even embed watch expressions directly into the IDE user interface Notice the values on the right hand side these are typically the results of the toString method In IntelliJ we can customize these via renderers which we will discuss further But there s more to it as we ll see later on For now just consider this Every time I step over a line of code the IDE needs to collect all the variables in scope and invoke toString on every one of them In some case even more elaborate code This is expensive and slow…In the right click menu we have the mute renderers option By checking this option we can disable that behavior and potentially speed up the step over speed significantly Once we select that you will notice that all the values turn to three dots followed by the word toString This means the renderers don t fetch the value anymore They instead show this placeholder This removes the overhead of the renderers completely and can speed up your step over performance If we want to see the value we can click the toString label and the value is extracted dynamically Notice that this only impacts the objects Primitives arrays etc are unaffected by this feature Customize RenderingRendering is the process of drawing the element values in the watch To get started with rendereres we need to customize them through the right click menu here This launches the renderer customization dialog which lets us do amazing things in intellij For the most basic customization we can toggle and enable multiple features within this dialog Then press apply to instantly see them in the variables view below I can see the declared type of the field We can include fully qualified names for class files we can see the static field values We can include hex values for primitives by default which is a feature I always enable because it s so useful for me This is an amazing view that s worth exploring and customizing to fit your own preference where you can tune the verbosity level in the watch area But the real power of this dialog is in the second tab The java type renderer which is the next subject Data RenderingWe can go so much further with renderers You might recall the visit objects I ve shown before This is from a standard Spring Boot demo called pet clinic Spring Boot has the concept of a Repository which is an interface that represents a datasource Often a repository is just a table it can do more but it has a strong relation to an underlying SQL table and it helps to think about it in these terms If you look at the visitRepository and perRepository objects at the bottom of the screen you ll notice that we don t have much to go on These are just object IDs with no data that s valuable for a person debugging the objects I didn t expand them but there s nothing under the variables here either Lets fix that in the customize data view as we did before We add a renderer that applies to JpaRepository which is the base interface of this instance Then we just write the expression to represent the rendering here This renderer will apply to JPA repository and its sub interfaces or classes Next instead of using the default renderer I use an expression to indicate what we will show The JPARepository includes a method called count which queries the database and counts the number of elements within the database I simply invoke it notice I assume that the current object is the object being rendered I don t provide an object instance The IDE automatically runs in the context of the object You can also use this to represent the rendered object Notice I don t need to cast to a JPARepository This means the expression will be rendered directly in the watch without changing the toString method which in this case I obviously can t change and usually might not want to The toString method is useful in production I wouldn t want expensive code in there But in the renderer I can just go wild and do things that don t make sense in the repository Notice the on demand checkbox If we check this the expression will act like a muted renderer by default You will need to click it to see the value Let s apply this change to the code and you ll notice the visitRepository instantly changes to use the new expression we defined We can now immediately see that the repository has elements which is pretty cool Right Notice that petRepository isn t changed this is because it s a repository too but it isn t a JPARepository So far we did stuff that can theoretically be done by toString methods It might be hacky but it s not something unique Let s take this up a notch The “When expanding node option lets us define the behavior when a user expands the entry The findAll method of JPARepository returns all the entities in the repository this will be invoked when we expand the entry We can optionally check if there s a reason to show the expand widget In this case I use the count method which would be faster than repeatedly calling findAll Once we apply the changes we can see the elements from the repository listed You ll notice all elements are here and since they are objects we can see all the attributes like any object we see in the watch This is truly spectacular and you can t fake it with a toString call… Doing it for EveryoneThat was a cool feature right But it s so annoying to configure all of that stuff for every project Here we see the same renderer from before you ll notice that everything looks exactly the same The numbering the list of entities etc But when we open the list of renderers it s blank there are no renderers How does this suddenly work without a renderer What s going on We use code annotations to represent the renderer This way you can commit the renderer to the project repository and you don t need to configure individual IDE instances This is pretty simple we add a dependency on the JetBrains annotation library into the POM This is an annotation library That means the code doesn t change in a significant way It s just markers Since it s just hints to the debugger it s ignored in runtime and doesn t have any implications or overhead We add an import to the renderer then we scroll down and we added simple renderer annotation code Notice that this is pretty much the code I typed in the dialog but this time it s used in an annotation this way our entire team can benefit from the improved view of repository objects If you re building libraries or frameworks you can integrate this to make the debugging experience easier to your users without impacting the behavior of the toString methods or similar semantics FinallyIn the next video we ll discuss threading issues Their reputation as “hard to debug isn t always justified If you have any questions please use the comments section Thank you 2023-01-10 17:14:22
Apple AppleInsider - Frontpage News Apple opens up Podcasts Subscriptions to publishers on rival services https://appleinsider.com/articles/23/01/10/apple-opens-up-podcasts-subscriptions-to-publishers-on-rival-services?utm_medium=rss Apple opens up Podcasts Subscriptions to publishers on rival servicesPodcast producers on certain popular platforms can now have an Apple Podcasts Subscriptions version created automatically through Delegated Delivery Podcast producers can now automatically distribute their shows on Apple Podcasts Subscriptions as well as rival servicesApple s Podcast Subscriptions service went live in June and by August the company was claiming that paid subscriptions had risen Significantly Apple did not say how many subscribers this represented nor would it give a precise figure of how many podcasts had joined its new membership service Read more 2023-01-10 18:00:12
Apple AppleInsider - Frontpage News Apple 'Shape Island' trailer drops ahead of January 20 debut https://appleinsider.com/articles/23/01/10/apple-shape-island-drops-ahead-of-january-20-streaming-debut?utm_medium=rss Apple x Shape Island x trailer drops ahead of January debutApple has released a trailer for Shape Island a new show for kids coming to Apple TV that s based on a popular trilogy of picture books Shape Island premieres on January Premiering globablly on Friday January Shape Island is based on the bestselling picture books by Mac Barnett and Jon Klassen It s a stop motion animated series that follows serious Square adventurous Circle and tricky Triangle as they build their friendship and search for fun Read more 2023-01-10 17:42:51
海外科学 NYT > Science Virgin Orbit’s Failed Launch a Setback for U.K.’s Space Industry https://www.nytimes.com/2023/01/10/business/uk-satellite-virgin-orbit.html Virgin Orbit s Failed Launch a Setback for U K s Space IndustryWhen a Virgin Orbit rocket fell short of orbit it dealt a blow to Britain s space program and the companies whose satellites were lost in the mission 2023-01-10 17:50:11
金融 金融庁ホームページ 非常勤職員(専門研究員)を募集しています。 https://www.fsa.go.jp/common/recruit/r4/kenkyu-05/kenkyu-05.html 非常勤職員 2023-01-10 17:30:00
ニュース BBC News - Home UK weather: Heavy rain prompts dozens of flood warnings https://www.bbc.co.uk/news/uk-64227514?at_medium=RSS&at_campaign=KARANGA wales 2023-01-10 17:14:13
ニュース BBC News - Home Jofra Archer takes three wickets on injury comeback for MI Cape in SA20 https://www.bbc.co.uk/sport/cricket/64227297?at_medium=RSS&at_campaign=KARANGA Jofra Archer takes three wickets on injury comeback for MI Cape in SAJofra Archer takes three wickets as the England bowler makes an impressive return to competitive cricket after months out with injury 2023-01-10 17:43:50
ビジネス ダイヤモンド・オンライン - 新着記事 「モナコってどんな国?」2分で学ぶ国際社会 - 読むだけで世界地図が頭に入る本 https://diamond.jp/articles/-/315549 2023-01-11 03:00:00
ビジネス ダイヤモンド・オンライン - 新着記事 「他者はあなたの期待を満たすために生きているのではない」と認めれば、心は必ず軽くなる【書籍オンライン編集部セレクション】 - 嫌われる勇気──自己啓発の源流「アドラー」の教え https://diamond.jp/articles/-/315666 2023-01-11 02:55:00
海外TECH reddit [Passan] BREAKING: Shortstop Carlos Correa and the Minnesota Twins are finalizing a six-year, $200 million contract, sources tell ESPN. The deal has a vesting option that can max out at $270 million. It is pending physical. https://www.reddit.com/r/baseball/comments/108fbwb/passan_breaking_shortstop_carlos_correa_and_the/ Passan BREAKING Shortstop Carlos Correa and the Minnesota Twins are finalizing a six year million contract sources tell ESPN The deal has a vesting option that can max out at million It is pending physical submitted by u Waaaaaaaaaasuup to r baseball link comments 2023-01-10 17:22:04

コメント

このブログの人気の投稿

投稿時間: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件)