投稿時間:2021-06-23 23:39:15 RSSフィード2021-06-23 23:00 分まとめ(49件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Engadget Japanese PCゲーム入門におすすめ「Razer Level Up Bundle」8,980円のオトクな3点セット https://japanese.engadget.com/razer-level-up-bundle-133051406.html razer 2021-06-23 13:30:51
python Pythonタグが付けられた新着投稿 - Qiita Python Challenge level 2 https://qiita.com/iHdkz/items/3110e45336f7b36390d5 というわけで、pythonプログラムの方針は固まりましたので書いてみましょう。 2021-06-23 22:47:25
python Pythonタグが付けられた新着投稿 - Qiita 時変データを2値化して変化の時間間隔をもとめる https://qiita.com/sgeboku/items/c0b4e390497045483a4e 2021-06-23 22:33:57
python Pythonタグが付けられた新着投稿 - Qiita PythonでSymbolブロックチェーンとwebsocket通信を行う https://qiita.com/nomorin/items/74d1eafc85a4c9995c2c 今回の例ではblockについて実装していますが、他にも監視できる種別があるため後述します。 2021-06-23 22:21:37
js JavaScriptタグが付けられた新着投稿 - Qiita Windows + Adobe CC illustrator / CEP 5 でイラレのカスタム UI を作ってみる (3) ボタンを作ってリロードする https://qiita.com/yunaito/items/ab4137ee78661feb0d04 エクステンションの中身を更新しても、illustratorを再起動しない限り変更が反映されないのです。 2021-06-23 22:36:56
js JavaScriptタグが付けられた新着投稿 - Qiita Windows + Adobe CC illustrator / CEP 5 でイラレのカスタム UI を作ってみる (2) 中身をざっと見る https://qiita.com/yunaito/items/20005d6cdde7decf7adf このインターフェースは中身的にはHTMLを開いて表示しているわけで、indexhtmlに記述されています。 2021-06-23 22:34:36
js JavaScriptタグが付けられた新着投稿 - Qiita TweetボタンのテキストをJavascriptで動的に変更する https://qiita.com/Aiju19/items/45efcf0bc5d09bcb3bfb TweetボタンのテキストをJavascriptで動的に変更する概要最近作ったサイトで、Tweet機能を実装する際に、診断メーカーとかでよくある「ツイート内容を動的に書き換える」のにひと工夫必要だったので、ここでまとめておこうと思う。 2021-06-23 22:25:28
js JavaScriptタグが付けられた新着投稿 - Qiita Windows + Adobe CC illustrator / CEP 5 でイラレのカスタム UI を作ってみる (1) 環境準備 https://qiita.com/yunaito/items/c67121efa9e5c6e3663a クリックすると作成したボタンが表示された状態になります。 2021-06-23 22:18:27
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) プルダウンの表示によって読み込むphpを変えたい https://teratail.com/questions/345752?rss=all プルダウンの表示によって読み込むphpを変えたい問い合わせフォームを作っているのですが、プルダウンの内容によって読み込むphpを変えたいと考えています。 2021-06-23 22:52:56
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 小計が0円の商品名も非表示にしたい。 https://teratail.com/questions/345751?rss=all 画像のように要素の合計が円のとき商品の行も非表示にしたい実際の表はoptionの個数もキャラ数ももっと多いです。 2021-06-23 22:52:46
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Undefined variable: order_count https://teratail.com/questions/345750?rss=all Undefinedvariableordercount事象ECサイトの機能として、ユーザからの注文が確定した際にcartsテーブルのordercountカラムユーザがカートに入れた商品数から値を取得し、商品の情報を管理しているproductsテーブル内のstockカラム商品ごとの在庫データの値をアップデートする処理を行うため、以下のコードを書いたのですが、タイトルに記載のエラーが表示されてしまいます。 2021-06-23 22:43:15
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) TypeScriptでEventDispatcherに型付けをしたい https://teratail.com/questions/345749?rss=all TypeScriptでEventDispatcherに型付けをしたいゲームを作成してるのですが、イベント管理のために以下のようなEventDispatcherを作成したのですが、イベントの受け渡しに使うGameEventクラスのtargetにも型付けを行いたいです。 2021-06-23 22:41:11
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【Djangoテストメソッド】assertQuerysetEqualの代替 https://teratail.com/questions/345748?rss=all 【Djangoテストメソッド】assertQuerysetEqualの代替Querysetをユニットテストで検討するためのテストメソッドとしてassertQuerysetEqualが用意されていますが、下記の理由により別のテストメソッドで確認出来たらと考えています。 2021-06-23 22:35:43
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) AWSにおけるシステム構成に関する質問(NATとEC2について) https://teratail.com/questions/345747?rss=all 2021-06-23 22:35:12
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) python vscode 仮想環境が作れない https://teratail.com/questions/345746?rss=all 発生している問題・エラーメッセージターミナルにコードを打ってもPythonと表示されるだけで仮想環境が作れないエラーメッセージpython該当のソースコードソースコードPythonnbspmnbspvenvnbsptest試したこと再インストール、ほかのコマンドも打ってみる。 2021-06-23 22:26:20
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) キーを指定回数押したら1.0fになるようにしたい。 https://teratail.com/questions/345745?rss=all そのときにゲージを表示してキーを押したらゲージが溜まっていき最大になったら動けるようになるみたいなものを作りたいです。 2021-06-23 22:26:14
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Googleドキュメントでエラーが発生しました。と出る https://teratail.com/questions/345744?rss=all Googleドキュメントでエラーが発生しました。 2021-06-23 22:17:26
Ruby Rubyタグが付けられた新着投稿 - Qiita returnとputsの違い https://qiita.com/ymnb/items/fc539d34014a6c27b14f returnとputsの違いreturnとputsの違いどちらも文を表示させる機能だが、メソッドを終了させるかどうかという点が異なる。 2021-06-23 22:30:37
Docker dockerタグが付けられた新着投稿 - Qiita 【TP転職市場PJ日記その7】ついにβ版リリースとトラップ https://qiita.com/Goronya_10/items/782a06eb5e6b7072b35e 自動化ってかっこいいhttpsで罠があって終わった件さて、このサービスはセンシティブな情報を扱うサービスではないが一応、一般的にhttps等使われているものは漏れなく合わせていきたいところというわけでhttpsportalを使うことに※先人の方の記事を参考に実施※しかし、この方法で実施した際にdockerの再起動の度にhttpsの再発行が走ってしまいリリース前にhttpsの証明発行ができなくなってしまう事態に…よく読んでなかったのが失敗だったわ。 2021-06-23 22:58:23
Docker dockerタグが付けられた新着投稿 - Qiita Dockerの基本操作 https://qiita.com/Ub_Iwerks/items/6e567144db62ab644c2d イメージを作成dockerimagebuildtsamplesinatralatestコンテナを作成・起動itオプション、インティラクティブにコマンドを実行する。 2021-06-23 22:10:39
技術ブログ Developers.IO Go言語のグラフデータモデル用ORM ent が良かった https://dev.classmethod.jp/articles/go-gremlin-orm-ent/ facebook 2021-06-23 13:02:45
海外TECH DEV Community CSS Selectors: The Full Reference Guide 🚀 https://dev.to/underscorecode/css-selectors-the-full-reference-guide-3cbf CSS Selectors The Full Reference Guide Hello everybody Today we ll be covering CSS selectors in depth Table of contentsWhat is a selector in CSS Types of selectorsUniversal selectorType selectorClass selectorID selectorAttribute selectorGrouping selectorsGroup selectorCombining selectorsDescendant combinatorChild combinatorGeneral sibling combinatorAdjacent sibling combinatorPseudo classesPseudo elements What is a selector in CSS A CSS selector is a pattern used to choose the HTML elements that we want to style Speaking more technically CSS selectors are able to select those HTML elements to which a style ruleset will be applied Types of selectors Universal selector Syntax style properties This selector is represented by an asterisk and matches all the elements in the HTML document lt ul gt lt li gt Computer Science Eng lt li gt lt li gt Mathematics lt li gt lt li gt Physics lt li gt lt ul gt border px solid coral This will apply a px solid coral border to all elements in the document Output The border property shows very well the behavior of this selector As you can observe in the image above every element is now surrounded by a border including the lt body gt element and the lt html gt element The universal selector is also used to avoid confusion and make your code easier to read Let s take a look at the following examples div first child background color maroon div first child background color maroon These two code snippets look both pretty much the same right Well we only need to notice the blank space between the type selector and the pseudo class to realize that they re not exactly the same the first one selects the first child of every lt div gt element and the second one selects the lt div gt elements that are first children themselves of another element Don t panic yet we ll be talking more in detail about pseudo classes and how selectors work later on For now just keep in mind that in this example there are two different element selectors working together to apply a styling rule Everything will make sense later Promise In any case to distinguish one from the other and being able to see the blank space more clearly we can make use of the universal selector as shown below div first child background color maroon Speaking in terms of functionality adding an asterisk symbol does nothing but it s useful to quickly identify the elements that are going to be targeted and to keep your code neat and tidy Type selector Syntax elemType style properties This selector matches all elements that belong to the specified type lt p gt A paragraph lt p gt lt p gt Another paragraph lt p gt lt p gt One more paragraph lt p gt p font size rem color deeppink This will apply a font size of rem and a deep pink color to all lt p gt elements Easy and direct Output Class selector Syntax classname style properties This selector is represented by a period and matches all elements that contain the specified class lt div gt lt p class deeppink gt This is a deep pink paragraph lt p gt lt p class hotpink gt This is a hot pink paragraph lt p gt lt p class pink gt This is a regular pink paragraph lt p gt lt p class deeppink bg gt This is a paragraph with a deep pink background lt p gt lt p class hotpink bg gt This is a paragraph with a hot pink background lt p gt lt p class pink bg gt This is a paragraph with a regular pink background lt p gt lt div gt deeppink color deeppink hotpink color hotpink pink color pink deeppink bg background color deeppink hotpink bg background color hotpink pink bg background color pink Group selector Stay until the end to understand its behavior deeppink bg hotpink bg pink bg color white This will apply a different pink color variant to every lt p gt element depending on the class they contain styling either their text or their background Output Another way to specify a class selector is by appending the type of the element that contains the classname in front of the regular class selector Take a look at this example of a regular list lt ul gt lt li class list item gt lt li gt lt li class list item gt lt li gt lt li class list item gt lt li gt lt ul gt We could style every list item like this list item padding px Or like this li list item padding px Note that in this specific case it wouldn t be necessary to use this method because all the elements that contain the list item class are lt li gt elements so appending the element type wouldn t make any difference But let s have a look at this other example below lt section gt lt h class big gt List of animals lt h gt lt ul gt lt li gt lt p class big gt Cat lt p gt lt li gt lt li gt lt p class big gt Dog lt p gt lt li gt lt li gt lt p class big gt Monkey lt p gt lt li gt lt li gt lt p class big gt Dolphin lt p gt lt li gt lt li gt lt p class big gt Frog lt p gt lt li gt lt ul gt lt section gt In this example we have different types of elements referencing the same class so in order to apply different styling rules to each of them we need to specify the type of the elements that contain that class Otherwise the elements won t be targeted properly and consequently the styles we re trying to apply won t be displayed as expected So we should do something like the following to apply different rules depending on if the element is a heading or a paragraph h big font size rem color coral p big font size rem color orange Output ID selector Syntax idname style properties This selector is represented by a hash symbol and matches the unique element that contains the specified id lt div gt lt table id users table gt lt th gt Users lt th gt lt tr gt lt td gt John Doe lt td gt lt tr gt lt tr gt lt td gt Jane Doe lt td gt lt tr gt lt table gt lt table id staff table gt lt th gt Staff lt th gt lt tr gt lt td gt Hannah Legend lt td gt lt tr gt lt tr gt lt td gt Daniel Oaks lt td gt lt tr gt lt table gt lt div gt Type selector table padding px ID selectors users table background color black color white staff table border px solid black This will apply a black background color and a white text color to the table that matches the id users table and a px solid black border to the table that matches the id staff table Both of them receive a padding of px based on their type Output Important Even though HTML allows you to assign the same id value to several elements you shouldn t ever do it If you need to apply the same style to a bunch of different elements always use the class attribute You ll keep your code clean and will get rid of a possible confusion Attribute selector The attribute selector is more complex than the rest of the selectors and has several syntaxes that can be applied to our HTML elements based on which condition should be satisfied by them In other words it matches all the HTML elements which contain a specified attribute and whose value for that attribute satisfies a given condition Attribute selector syntaxes Syntax attr style properties Matches elements with the specified attribute lt nav gt lt ul gt lt li gt lt a href gt Home lt a gt lt li gt lt li gt lt a href blog gt Blog lt a gt lt li gt lt li gt lt a href contact gt Contact lt a gt lt li gt lt li gt lt a href about gt About lt a gt lt li gt lt ul gt lt nav gt Type selector nav background color darkslategray padding px Attribute selector a href color white text decoration none This will apply a white color to every lt a gt element that contains the href attribute regardless of its value and removes the underline We re also styling the lt nav gt element with a background color and some padding by making use of the type selector Output Syntax attr value style properties Matches elements whose value for attr is exactly value lt form gt lt label for username gt Username lt label gt lt input id username type text placeholder Username gt lt label for password gt Password lt label gt lt input id password type password placeholder Password gt lt form gt input type text color chocolate This will apply a chocolate text color to every lt input gt element that has the type attribute with an exact value of text Output We could as well use this syntax to emulate the ID selector remember the example in section id users table background color black color white id staff table border px solid black Explanation By using this attribute selector syntax we are targeting elements that contain an id attribute whose value is exactly users table or staff table We re using this one syntax because an element can only have one idname so the value needs to be exact Syntax attr value style properties Matches elements whose value for attr is a list of words separated by blanks and one of them is exactly value lt p lang en gb en us en ca en au en nz gt Welcome lt p gt lt p lang fr fr fr ca fr be gt Bienvenue lt p gt p lang en us color navy p lang fr fr color red This will apply a navy color to every lt p gt element whose value for lang is a list that contains the exact string en us Same for all lt p gt elements whose value for lang contains fr fr applying a red color in this case Output As well as the previous syntax through which we could emulate the ID selector behavior we can also use this one attribute syntax to emulate the behavior of the class selector class list item padding px Explanation By using this attribute selector syntax we are targeting elements that have a class attribute whose value is a list that contains the string list item We re using this specific syntax because an element can contain several classes and we re aiming at just one of them But even though the element had just one class the value for the class attribute always acts like a list of values Syntax attr value style properties Matches elements whose value for attr is exactly value or starts with value followed by a hyphen lt p lang en us gt Hello lt p gt lt p lang en gb gt Hello lt p gt p lang en background color cornflowerblue color antiquewhite This will apply a cornflower blue background color and an antique white text color to every lt p gt element that has a lang attribute whose value is exactly en or starts with en Output Syntax attr value style properties Matches elements whose value for attr starts with value lt a href list gt Go to list lt a gt lt a href list gt Go to list lt a gt lt section gt lt h gt Lists lt h gt lt div id list gt lt h gt List lt h gt lt ul gt lt li gt Milk lt li gt lt li gt Butter lt li gt lt li gt Eggs lt li gt lt li gt Sugar lt li gt lt ul gt lt div gt lt div id list gt lt h gt List lt h gt lt ul gt lt li gt Oranges lt li gt lt li gt Lemons lt li gt lt li gt Strawberries lt li gt lt li gt Apples lt li gt lt ul gt lt div gt lt section gt a href color crimson font size rem This will apply a crimson color and a font size of rem to every lt a gt element that has a href attribute whose value starts with Output Syntax attr value style properties Matches elements whose value for attr ends with value lt a href css selectors guide pdf gt CSS Selectors Guide lt a gt a href pdf color slateblue This will apply a slate blue color to every lt a gt element that has a href attribute whose value ends with pdf Output Syntax attr value style properties Matches elements whose value for attr contains at least one occurrence of value lt div class small box gt lt p gt This is a small box lt p gt lt div gt lt div class big box gt lt p gt This is a big box lt p gt lt div gt div class box background color burlywood This will apply a burlywood background color to every lt div gt element that contains a class attribute whose value has at least one occurrence of the string box Output Grouping selectors Grouping selectors in CSS is basically used to put together those elements of different type or with different id classes that we want to apply the same style properties to Additionally by using this technique we ll get rid of redundancy and our code will be clean concise and organized Group selector Syntax elem elemN style properties This selector is represented by a comma and matches all the elements stated in the list and applies the same ruleset to all of them lt h gt Computer Science Engineering lt h gt lt h gt List of courses lt h gt lt ul gt lt li gt Algebra lt li gt lt li gt Calculus lt li gt lt li gt Physics lt li gt lt li gt Discrete Mathematics lt li gt lt li gt Introduction to Programming lt li gt lt ul gt h h li color darkred This will apply a dark red color to every lt h gt lt h gt and lt li gt element Output Combining selectors CSS selectors can also be combined By combining selectors then we can define CSS combinators CSS combinators are used to establish a relationship between different selectors and are very useful to make your element selection more targeted Descendant combinator Syntax elem elem style properties This combinator is represented by a single space and matches all elem that are descendants of elem Consider the following navigation lt nav gt lt ul gt lt li gt lt a gt Home lt a gt lt li gt lt li gt lt a gt People lt a gt lt ul gt lt li gt lt a gt Students lt a gt lt li gt lt li gt lt a gt Faculty members lt a gt lt ul gt lt a gt Discrete Mathematics lt a gt lt a gt Programming lt a gt lt a gt Physics lt a gt lt a gt Algorithms lt a gt lt ul gt lt li gt lt li gt lt a gt Staff members lt a gt lt li gt lt ul gt lt li gt lt li gt lt a gt About lt a gt lt li gt lt li gt lt a gt Contact lt a gt lt li gt lt ul gt lt nav gt nav a border px solid crimson color darkslateblue font size rem font weight bold This will apply a px solid crimson border a dark slate blue color a font size of rem and a bold font weight to every lt a gt element that is descendant of a lt nav gt element regardless of how nested they are Output Child combinator Syntax elem gt elem style properties This combinator is represented by a prompt gt and matches all elem that are direct children of elem lt div class box gt lt p gt This is a direct child of box lt p gt lt div gt lt p gt This is not a direct child of box lt p gt lt div gt lt p gt This is another direct child of box lt p gt lt div gt box gt p color darkgoldenrod This will apply a dark golden color to every lt p gt element that is a direct child of any element that has the class box so in this HTML example the first and last lt p gt elements will be selected but not the one in the middle Output General sibling combinator Syntax elem elem style properties This combinator is represented by a tilde and matches all elem that are siblings to elem and come after it lt img src blue mug jpeg alt a regular blue coffee mug gt lt p gt Blue mug lt p gt lt p gt Price lt p gt img p color darkblue This will apply a dark blue color to every lt p gt element which is a sibling of any lt img gt element and comes after it In this example both lt p gt elements will be selected Output Adjacent sibling combinator Syntax elem elem style properties This combinator is represented by a plus symbol and matches all elem that are siblings to elem and appear immediately after it lt img src blue mug jpeg alt a regular blue coffee mug gt lt p gt Blue mug lt p gt lt p gt Price lt p gt img p color darkblue In this case only the first lt p gt element will be selected since the second one doesn t appear immediately after the lt img gt element Output Pseudo classes A CSS pseudo class is a keyword that is added to a selector and defines a special state of the selected elements Syntax elem pseudo class style properties This selector is represented by a colon lt h gt Shopping list lt h gt lt ul gt lt li gt Milk lt li gt lt li gt Butter lt li gt lt li gt Eggs lt li gt lt li gt Sugar lt li gt lt ul gt li hover background color black color white In this example we re applying a black background color and a white text color to every lt li gt element when the cursor hovers over it Take a look at what happens when we hover over the Butter element Output Some of the most common CSS pseudo classes are active hover focus disabled checked first child nth child first of type Pseudo elements A CSS pseudo element is a keyword that is added to a selector to style a specific part of the selected elements Syntax elem pseudo element style properties This selector is represented by a double colon lt p gt CODE lt p gt p before content In this example we re appending an underscore symbol in front of every lt p gt element Output Some of the most common CSS pseudo elements are after can also be written as after before can also be written as before marker placeholder first letter And that s pretty much it I hope this reference guide has been helpful for you You can also check out the following related posts about CSS selectors on underscorecode Instagram account Don t forget to follow underscorecode on Instagram and Twitter for more daily webdev content 2021-06-23 13:35:26
海外TECH DEV Community Escalando aplicações automaticamente no Kubernetes usando KEDA https://dev.to/willianccs/escalando-aplicacoes-automaticamente-no-kubernetes-usando-keda-c41 Escalando aplicações automaticamente no Kubernetes usando KEDAPara quem ainda não conhece o KEDA Kubernetes Event Driven Autoscaling é Um componente leve e de finalidade única que pode ser adicionado a qualquer cluster do Kubernetes Funciona junto com componentes Kubernetes padrão como o Horizontal Pod Autoscaler HPA e pode estender a funcionalidade sem sobrescrever ou duplicação Retirado da documentação oficialFoi lançado no fim de anúncio oficial e éfruto de uma parceria entre Microsoft amp Red Hat E ele cumpre bem o lema que é “Application autoscaling made simple Nativamente o Kubernetes sópermite configurar HPA com as métricas de CPU e memória Se quiser escalar as aplicações utilizando outro tipo de métrica por exemplo lags de eventos ou filas vocêprecisa primeiro criar um adaptador de métricas custom metrics para extrair as métricas da fonte desejada Entretanto se precisar obter métricas de várias fontes usando vários adaptadores vocêestásem sorte porque apenas um por vez écompatível a menos que tenha mudado recentemente Jáo KEDA extrai de uma variedade de fontes e dimensiona automaticamente suas implantações de a N instâncias com base em sua configuração no ScaledObject Outro ponto interessante éque o KEDA não “reinventa a roda e não construiu seu próprio mecanismo de escalonamento se aproveitando de HPAs do Kubernetes e dos secrets TriggerAuthentication jáusados pelas aplicações INSTALANDO O KEDAAs instruções para implantar o KEDA são muito simples e podem ser encontradas aqui Existem três maneiras de implantar KEDA em seu cluster Kubernetes Helm chartsOperator HubImplantar YAMLsVamos usar a primeira opção helm repo add kedacore helm repo updatekubectl create ns kedahelm install keda kedacore keda namespace kedaApós a instalação teremos deployments KEDA Operator e KEDA Metrics API rodando no cluster…kubectl get deployment n kedaNAME READY UP TO DATE AVAILABLE AGEkeda operator hkeda operator metrics apiserver he mais alguns CRDs disponíveis kubectl api resources api group keda shNAME SHORTNAMES APIGROUP NAMESPACED KINDscaledjobs sj keda sh true ScaledJobscaledobjects so keda sh true ScaledObjecttriggerauthentications ta triggerauth keda sh true TriggerAuthenticationScaledJobs ScaledObject Os ScaledJobs ScaledObjects mapeiam uma fonte de evento para a jobs deployments que vocêdeseja dimensionar TriggerAuthentication Se necessário este recurso contém a configuração de autenticação necessária para monitorar a origem do evento O ScaledObject também cria o HPA para você O KEDA não apenas dimensiona deployments mas também pode dimensionar seus jobs do Kubernetes Em vez de ter muitos eventos processados ​​em sua implantação e aumentar ou diminuir com base no número de mensagens que precisam ser consumidas o KEDA pode ativar um trabalho para cada mensagem na origem do evento EXEMPLO COM KAFKAVamos dar uma olhada mais de perto no ScaledObject e Kafka trigger apiVersion keda sh valphakind ScaledObjectmetadata name kafka consumer scaler labels deploymentName my kafka consumer service namespace samplespec scaleTargetRef deploymentName my kafka consumer service pollingInterval Optional Default seconds cooldownPeriod Optional Default seconds minReplicaCount Optional Default maxReplicaCount Optional Default triggers type kafka metadata topic test topic brokerList my cluster kafka bootstrap kafka deprecated bootstrapServers my cluster kafka bootstrap kafka consumerGroup my kafka consumerGroup lagThreshold Default offsetResetPolicy latest allowIdleConsumers false authenticationRef name keda trigger auth kafka credential Optional list of topics to trigger type kafka metadata topic test topic bootstrapServers my cluster kafka bootstrap kafka consumerGroup my kafka consumerGroup lagThreshold Default offsetResetPolicy latest allowIdleConsumers false authenticationRef name keda trigger auth kafka credentialO ScaledObject TriggerAuthentication e a implantação referenciada em deploymentName precisam estar no mesmo namespace Apesar de serem valores opcionais éimportante definir valores dentro dos padrões para seu negócio nos parâmetros minReplicaCount e maxReplicaCount Para evitar rebalanceamento de partições no Kafka E OU evitar que muitos pods sejam iniciados consumindo todos os recursos do cluster O parâmetro offsetResetPolicy pode ser earliest ou latest Como o KEDA vai percorrer todos os tópicos vale a pena entender como o código negócio se comporta com duplicidade de eventos Por padrão o número de réplicas não excederáo número de partições em um tópico Ou seja se maxReplicaCount for definido mais do que o número de partições o escalonador não vai atingir o valor definido Caso queira mudar este comportamento ajuste o parâmetro allowIdleConsumers para true Porém se houver mais número de consumidores do que número de partições em um tópico o consumidor extra teráque ficar ocioso Para facilitar criamos um usuário no Kafka com permissão de somente leitura list e describe em todos os grupos e tópicos e referenciamos no TriggerAuthentication o secret com este usuário apiVersion keda sh valphakind TriggerAuthenticationmetadata name keda trigger auth kafka credential namespace samplespec secretTargetRef key sasl name keda credentials parameter sasl key username name keda credentials parameter username key password name keda credentials parameter password REFERÊNCIAS AGRADECIMENTOSObrigado àtodos os envolvidos que me incentivaram a escrever este artigo e revisaram o texto Felipe Lamarão Silva lipekis Willian Itiho Willian Itiho Rafael Gomes gomex 2021-06-23 13:18:01
海外TECH DEV Community Reactifying Custom Elements using a Custom Elements Manifest https://dev.to/thepassle/reactifying-custom-elements-using-a-custom-elements-manifest-2e Reactifying Custom Elements using a Custom Elements ManifestWe finally have a stable version of the Custom Elements Manifest schema and this means we can finally start creating some cool tooling with it Don t know what a Custom Elements Manifest is Read all about it in the announcement post TL DR A Custom Elements Manifest is a JSON file that contains all metadata about the custom elements in your project You can read all about it here React is a bit of a pain when it comes to web components and unlike other frameworks requires a bunch of special handling to support HTML The TL DR here is that React passes all data to Custom Elements in the form of HTML attributes and can t listen to DOM events due to reinventing the wheel with their own synthetic events system For fun and science I decided to try my hand at creating a custom elements manifest analyzer plugin to automagically create some React wrappers for my custom elements project generic components which is a collection of accessible zero dependency vanilla JS web components Do note that this is mostly a PoC I m sure things could be improved and edgecases were missed this is mostly an experiment to see how we can utilize the Custom Elements Manifest In this blog we ll walk through a couple of the steps and decisions to reactify our custom elements and showcase how we can leverage a projects custom elements json to achieve this goal You can read more about custom elements manifest analyzers rich plugin system here Plugin Authoring Handbook and be sure to check out the cem plugin template repository If you want to follow along you can find the code for our reactify plugin here Custom ElementsFirst of all we have to find all the custom elements in our Custom Elements Manifest that we want to reactify Fortunately classes in the Manifest that are actually custom elements are flagged with a customElement true flag so we can loop through all the modules of our Manifest and find any class declaration that has the customElement flag const elements customElementsManifest modules forEach mod gt mod declarations forEach dec gt if dec customElement elements push dec Now that we have an array of all the custom elements in our project we can start creating some React wrappers SlotsLets start off easy slots Slots are a native way to provide children to your custom elements Much like React s children Which means we can just use children to project any children of the Reactified component straight to the Custom Element which if it supports slots will correctly render them function GenericSwitch children return lt generic switch gt children lt generic switch gt Usage lt GenericSwitch gt Toggle me lt GenericSwitch gt Easy peasy PropertiesNext up Properties In React land everything gets passed around as a property This is forms a bit of a problem because in HTML land not everything is a property we also have attributes Sometimes an elements attributes and properties are even synced up and this could mean that there are attributes and properties with the same name like an element with a disabled attribute property or a checked attribute property Fortunately in a Custom Elements Manifest we can make a distinction between the two If an attribute has a relation with a corresponding property it will have a fieldName property attributes name checked type text boolean fieldName checked This means that we can ignore the checked attribute but interface with the checked property instead and avoid having two props with the same name Because React will set everything on a custom element as an attribute ugh we have to get a ref for our custom element and set the property that way Here s an example function GenericSwitch checked const ref useRef null useEffect gt ref current checked checked checked return lt generic switch ref ref gt lt generic switch gt AttributesThis is where things get a little bit more interesting Again in React land everything gets passed around as a property However it could be the case that a custom element has an attribute name that is a reserved keyword in JS land Here s an example lt generic skiplink for someID gt lt generic skiplink gt In HTML this for attribute is no problem But since we re reactifying and everything in React land gets passed around as a JavaScript property we now have a problem Can you spot what the problem is in this code function GenericSkiplink for return lt generic skiplink for for gt lt generic skiplink gt Exactly for is a reserved JavaScript keyword so this will cause an error In order to avoid this we ll provide an attribute mapping to avoid these kinds of clashes export default plugins reactify Provide an attribute mapping to avoid clashing with React or JS reserved keywords attributeMapping for for Whenever we find an attribute that is a reserved keyword in JavaScript we try to see if there was an attributeMapping for this attribute provided and if not we have to throw an error Using this attributeMapping the resulting React component now looks like function GenericSkiplink for return lt generic skiplink for for gt lt generic skiplink gt Note that we don t want to change the actual attribute name because that would cause problems we only change the value that gets passed to the attribute Boolean attributesBoolean attributes require some special attention here as well The way boolean attributes work in HTML is that the presence of them considers them as being true and the absence of them considers them as being false Consider the following examples lt button disabled gt lt button gt lt button disabled gt lt button gt lt button disabled true gt lt button gt lt button disabled false gt lt button gt lt Yes even this is considered as true gt Calling button hasAttribute disabled on any of these will result in true This means that for boolean attributes we can t handle them the same way as regular attributes by just calling ref current setAttribute but we need some special handling Fortunately the Custom Elements Manifest supports types so we can easily make a distinction between regular attributes and boolean attributes attributes name checked type text boolean fieldName checked EventsReact has their own synthetic event system to handle events which doesn t play nice with custom elements read HTML Fortunately we can easily reactify them React events work with the following convention lt button onClick e gt console log e gt Our Custom Elements Manifest very conveniently holds an array of Events for our custom elements events name checked changed type text CustomEvent This means we can find all events for our custom element prefix them with on and capitalize and camelize them onCheckedChanged Then we can use our ref to add an event listener function GenericSwitch onCheckedChanged const ref useRef null useEffect gt ref current addEventListener checked changed onCheckedChanged return lt generic switch ref ref gt lt generic switch gt ImportingFinally we just need to create the import for the actual custom element in our reactified component Fortunately for us if a module contains a customElements define call it will be present in the Manifest This means we can loop through the Manifest find where our custom element gets defined and stitch together some information from the package json to create a bare module specifier switch js import GenericSwitch from generic switch GenericSwitch js customElements define generic switch GenericSwitch Will result in custom elements json kind javascript module path switch js declarations exports kind custom element definition name generic switch declaration name GenericSwitch module generic switch GenericSwitch js By stitching together the name property from the projects package json and the path from the module containing the custom element definition we can construct a bare module specifier for the import import generic components components switch js Using the pluginTo use our custom elements manifest analyzer Reactify plugin all I have to do is create a custom elements manifest config js in the root of my project import the plugin and add it to the plugins array custom elements manifest config js import reactify from cem plugin reactify js export default plugins reactify This means that every time I analyze my project it will automagically create the Reactified wrappers of my custom elements └ーlegacy ├ーGenericAccordion jsx ├ーGenericAlert jsx ├ーGenericDialog jsx ├ーGenericDisclosure jsx ├ーGenericListbox jsx ├ーGenericRadio jsx ├ーGenericSkiplink jsx ├ーGenericSwitch jsx ├ーGenericTabs jsx └ーGenericVisuallyHidden jsx ResultAnd as a final result here s our reactified Custom Element that correctly handles EventsPropertiesAttributesBoolean attributesSlots lt GenericSwitch disabled false boolean attribute checked true property label foo regular attribute onCheckedChanged e gt console log e event gt Toggle me slot lt GenericSwitch gt ConcludingWhile it s cool that we finally have a stable version of the Custom Elements Manifest which allows us to automate things like this working on this reactify plugin made me realize how backwards it even is that we need to resort to shenanigans like this and I hope React will seriously consider supporting HTML properly in future versions 2021-06-23 13:08:59
Apple AppleInsider - Frontpage News 'Ted Lasso' characters introduce 2020 Tokyo Olympics U.S. Soccer Women's National Team https://appleinsider.com/articles/21/06/23/ted-lasso-characters-introduce-2020-tokyo-olympics-us-soccer-womens-national-team?utm_medium=rss x Ted Lasso x characters introduce Tokyo Olympics U S Soccer Women x s National TeamTed Lasso and Coach Beard from the popular Apple TV show announced the U S Soccer Women s National Team roster Ted Lasso characters introduce Tokyo Olympics U S Soccer Women s National TeamThe official U S Soccer Women s National Team Twitter account shared a video of Ted Lasso characters introducing the Tokyo Olympics roster Jason Sudeikis and Brendan Hunt take on their roles as Ted Lasso and Coach Beard to announce the roster Read more 2021-06-23 13:59:24
Apple AppleInsider - Frontpage News American Airlines switching to iPhones, iPads for all frontline employees https://appleinsider.com/articles/21/06/23/american-airlines-switching-to-iphones-ipads-for-all-frontline-employees?utm_medium=rss American Airlines switching to iPhones iPads for all frontline employeesAmerican Airlines is planning to replace all of its current mobile devices for frontline employees including flight attendants and maintenance staff with new iPhone and iPad models Credit American AirlinesThe airline s chief information officer Maya Leibman made the announcement in an internal note on June American Airlines has already been testing frontline use of iPhone and iPad devices at Washington Airport according to View From the Wing Read more 2021-06-23 13:55:29
Apple AppleInsider - Frontpage News Apple urges House Judiciary Committee to block antitrust legislation https://appleinsider.com/articles/21/06/23/apple-urges-house-judiciary-committee-to-block-antitrust-legislation?utm_medium=rss Apple urges House Judiciary Committee to block antitrust legislationApple has written an open letter to the House Judiciary Committee arguing that proposed App Store legislation would harm consumers and create a privacy race to the bottom As lawmakers mark up the five proposed bills that would see Big Tech firms more regulated Apple has written a letter outlining what it sees as the harms these bills present Addressed to the chair and ranking members of the House Judiciary Apple s letter follows and reiterates its previous discussions with the committee Apple has appreciated the opportunity to engage with the House Judiciary Committee writes Timothy Powderly Apple s Senior Director Government Affairs Americas on our shared objective of ensuring that U S laws and Apple s business practices promote competition foster innovation and provide benefits and critical protections to consumers Read more 2021-06-23 13:18:19
Apple AppleInsider - Frontpage News Adobe refreshes Premiere in new public beta, simplifies importing and exporting https://appleinsider.com/articles/21/06/22/adobe-refreshes-premiere-in-new-public-beta-simplifies-importing-and-exporting?utm_medium=rss Adobe refreshes Premiere in new public beta simplifies importing and exportingAdobe has announced its plans to offer an easier to use more streamlined user experience in its popular video editor Premiere Pro with new changes first available to those in the public beta The first significant change comes to the Import Mode which has been redesigned to offer a media first experience Adobe has stripped away complex and confusing settings and allowed users to simply pick clips to import into new projects A new header bar has been designed to integrate the core phases of the editing process with specific options for importing editing and exporting In addition a new task specific drop down menu is accessible through the header The header bar also allows users to provide feedback on the beta quickly and easily Adobe also points out that the header design will be universal across all Creative Cloud applications in the future as they seek to unify users experiences across all apps Read more 2021-06-23 13:12:05
海外TECH Engadget Gogoro teams with Foxconn to make its e-scooters available worldwide https://www.engadget.com/gogoro-foxcoon-scooter-expansion-132555775.html?src=rss_b2c worldwide 2021-06-23 13:25:55
海外TECH Engadget NVIDIA's Canvas app turns doodles into AI-generated 'photos' https://www.engadget.com/nvidia-canvas-app-gaugan-beta-130038670.html?src=rss_b2c images 2021-06-23 13:00:38
海外科学 NYT > Science Some Republicans Find Failure to Grapple With Climate Change a ‘Political Liability’ https://www.nytimes.com/2021/06/23/climate/climate-change-republicans.html Some Republicans Find Failure to Grapple With Climate Change a Political Liability A small but growing number of Republicans say the G O P needs a coherent climate strategy and form a “Conservative Climate Caucus on Capitol Hill 2021-06-23 13:25:07
金融 金融庁ホームページ スチュワードシップ・コードの受入れを表明した機関投資家のリストについて更新しました。 https://www.fsa.go.jp/singi/stewardship/list/20171225.html 機関投資家 2021-06-23 15:00:00
金融 金融庁ホームページ 麻生副総理兼財務大臣兼内閣府特命担当大臣記者会見の概要を公表しました。 https://www.fsa.go.jp/common/conference/index.html 内閣府特命担当大臣 2021-06-23 14:08:00
ニュース BBC News - Home Dalian Atkinson: PC guilty of former footballer's manslaughter https://www.bbc.co.uk/news/uk-england-shropshire-57495426 country 2021-06-23 13:49:59
ニュース BBC News - Home UK denies Russia fired warning shots near British warship https://www.bbc.co.uk/news/world-europe-57583363 defender 2021-06-23 13:52:21
ニュース BBC News - Home Covid: Wembley VIP fans will face restrictions - minister https://www.bbc.co.uk/news/uk-57580088 covid 2021-06-23 13:36:15
ニュース BBC News - Home Exams altered next year after pandemic disruption https://www.bbc.co.uk/news/education-57579211 england 2021-06-23 13:18:20
ニュース BBC News - Home Leasehold campaigners welcome new changes https://www.bbc.co.uk/news/business-57578060 competition 2021-06-23 13:01:41
ニュース BBC News - Home Lloyds to close another 44 bank branches https://www.bbc.co.uk/news/business-57582259 halifax 2021-06-23 13:16:34
ニュース BBC News - Home Government encourages schools to host 'One Britain' events https://www.bbc.co.uk/news/uk-politics-57579002 calls 2021-06-23 13:30:20
ニュース BBC News - Home Brexit: How many more EU nationals in UK than previously thought? https://www.bbc.co.uk/news/56846637 brexit 2021-06-23 13:26:19
ビジネス ダイヤモンド・オンライン - 新着記事 香港紙「蘋果日報」、24日付で廃刊 - WSJ発 https://diamond.jp/articles/-/274909 蘋果日報 2021-06-23 22:02:00
LifeHuck ライフハッカー[日本版] 魚の形に18機能を搭載。軽量コンパクトなマルチツール『FishFace』【今日のライフハックツール】 https://www.lifehacker.jp/2021/06/236211lht-fishface.html fishface 2021-06-23 22:05:00
北海道 北海道新聞 オ3―1日(23日) ハム、投打とも振るわず https://www.hokkaido-np.co.jp/article/558998/ 日本ハム 2021-06-23 22:19:51
北海道 北海道新聞 車が路外逸脱、同乗の女性死亡 幌加内 https://www.hokkaido-np.co.jp/article/559019/ 幌加内町添牛内 2021-06-23 22:14:00
北海道 北海道新聞 核ごみ反対派町議が出馬表明 寿都町長選 調査撤回、国へ交付金返還も https://www.hokkaido-np.co.jp/article/558985/ 出馬表明 2021-06-23 22:10:49
北海道 北海道新聞 西4―6楽(23日) 楽天が連敗7で止める https://www.hokkaido-np.co.jp/article/559016/ 連敗 2021-06-23 22:02:00
北海道 北海道新聞 英、ネトフリ規制強化を検討 事実を正確に伝える仕組み協議 https://www.hokkaido-np.co.jp/article/559015/ 規制強化 2021-06-23 22:02:00
GCP Cloud Blog Investing in the heart Of Google Cloud, our developer and customer communities https://cloud.google.com/blog/topics/developers-practitioners/investing-heart-google-cloud-our-developer-and-customer-communities/ Investing in the heart Of Google Cloud our developer and customer communitiesAnnouncing new investments in Google Cloud developer and customer communitiesHelping developers be their best is core to Google Cloud s mission Our developer and IT admin communities serve inspiring roles in the complex cloud ecosystem by helping their users adopt new technologies and solve challenging business problems Our job is to support these technical communities wherever they are by making their jobs easier and encouraging them to push the boundaries of their imaginations Today we are thrilled to announce investments in two new communities First is the launch of the Google Cloud Community a new discussion forum that allows customers partners developers and technical practitioners to ask questions of any type and get help from a global network of peers both inside and outside of Google Second we are joining forces with Stack Overflow as a launch partner on their new Collectives product which helps developers find trusted answers faster access new Google product information all in a single place and earn additional recognition for their contributions Both communities will serve to enhance creativity foster greater collaboration and contribute to the overall success of our developer community and our valued customer base These investments reflect the energy and excitement we have for our Google developer community at large Announcing the Google Cloud CommunityOver the past year we ve seen developers increasingly connect digitally to share knowledge learn from one another and solve problems together To provide a hub for those interactions and provide new connectivity to Googlers we are introducing the Google Cloud Community Supplementing Google Cloud s docs tutorials and hands on training the Google Cloud Community discussion forums allow people to ask questions and get help from a global community of peers or give back to the community by sharing what they know  Googlers are excited to collaborate with this community to gather direct input that can inform our product roadmaps and create a feedback loop around our products and services Key Google Cloud Community experiences include Product discussion forums Join peer to peer discussions around products you use every day Community blogs Read thought leadership and technical content from Googlers and customers as well as community member interviews Be in the know on upcoming community learning opportunities industry trends best practices and events  Ideation and UX research Help drive product enhancements and innovation through member sourced ideas and research participation opportunities  Collaborative learning Find the right certification path join cohort based learning groups and connect with mentors  Community events Participate in virtual or in person meetups and events Engage directly with Google product managers and experts with “Queue the Questions an opportunity to ask questions about Google s products and technical topics  To consolidate and simplify our experiences the Google Cloud Community brings together discussion forums and groups for Google Cloud and Google Workspace  the Apigee Community and Cloud Connect Community Plans are forming to incorporate many other relevant Google Groups over the next year Get started with the Google Cloud Community Register and create a profile at googlecloudcommunity com Find a product discussion hub that interests you Start commenting and join the discussion and subscribe to stay up to date Participate in our first ever Community Learning Game to elevate your BigQuery Skills and earn rewards Google Cloud and Go Announce a New Partnership with Collectiveson Stack OverflowSince the earliest days of both Google Cloud and Google s Go programming language Stack Overflow has been an invaluable developer resource For the past five years the Go User Survey consistently identified Stack Overflow as the place to find answers to Go questions As the launch partner for Stack Overflow s Collectives Google is fostering and empowering the largest independent developer community to build faster and push the limits of both Google Cloud and the Go programming language This investment further underscores Google s commitment to supporting open source projects and communities Through Collectives users of Stack Overflow will see heightened participation from both the Google Cloud and Go Language teams We will be sharing knowledge engaging with developers over questions or feedback and recognizing those who most actively contribute to the Stack Overflow discussions around our technologies Key Stack Overflow Collectives experiences include Find trusted answers faster See answers recommended by Google or provided by Recognized Members Google employees and other Stack Overflow users who we recognize as subject matter experts on Google technologies Recognized Members will have badges identifying them when they post a question provide an answer or write an article Get product information all in one place Browse content relevant to Google Cloud and Go in a centralized place within the Collective There you can also find links to our website support channel and code hosting and social media accounts Explore new content formats Stay up to date on our technologies and find more in depth product information with articles long form content like how to guides and announcements that can be found on our Collectives page Earn recognition Get rewarded by Google for your contributions to the community There is a leaderboard you can access via our Collectives page see the “Members tab that will help us identify top contributors who we can designate as Recognized Members Get started with Stack Overflow Collectives Join the Stack Overflow Collective for Google Cloud and or the Collective for Google s Go Language Participate and share your expertise with other developers building with our technologies Thank you to all of our Google Cloud Developers for inspiring us with your ideas projects and creative solutions We look forward to more investments in giving you the very best experiences with Google Cloud and seeing all of the incredible contributions you ll make across the industry in the future 2021-06-23 14:20: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件)