TECH |
Engadget Japanese |
Zoom、Mac版アプリが会話終了後もマイクがオフにならない不具合を修正 |
https://japanese.engadget.com/zoom-undates-prevents-microphone-stay-active-on-mac-115012233.html
|
終了 |
2022-02-13 11:50:12 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
ANSI Color Code一覧をPython3で見た件とその知見 |
https://qiita.com/SARDONYX/items/b9cfab7ef0edc2f1963d
|
ANSIColorCode一覧をPythonで見た件とその知見すでに既出な題ですが、僕好みなColor一覧がなかったのであえて作成することにしました。 |
2022-02-13 20:55:00 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
ブロックチェーンエクスプローラーから取引履歴をまとめて抽出するコードを書いてみた |
https://qiita.com/yuk_t/items/578c5e6d0dad4acc10e5
|
walletトランザクションが発生したウォレットが記入されますchainトランザクションが発生したチェーンが記入されますnotes自分のウォレット間取引であればここにBotharemywalletsと書き込まれます本当はinternalにしたかったけど紛らわしかったので・・・。 |
2022-02-13 20:43:20 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
MicrosoftのWeb開発教材を使ってみた ⑥スペースシューティングゲーム 【ゲーム開発の基礎/Pub-Sub/Canvas/衝突検出】 |
https://qiita.com/NasuPanda/items/16ffb297be9b862d2785
|
Locationbased全てではないにしても、ほとんどのゲーム要素は位置情報に基づくつまり、座標xとyを持つということMovableこれらは新しい場所に移動することが出来るオブジェクトプレイヤーやモンスター、NPCなど木のような静的オブジェクトは別Selfdestructing自分自身を削除するために存在する一時的なプロパティ通常これはdeaddestroyedブール値で表され、このオブジェクトがレンダリングされなくなることをゲームエンジンに通知するCooldown短命なオブジェクトの典型的なプロパティ例として、数ミリ秒しか見られない爆発などのグラフィック効果・テキストゲーム開発における継承・コンポジション上で説明したような動作は、クラスやオブジェクトに関連付けられたメソッドとして表現できる。 |
2022-02-13 20:23:25 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
ANSI Color Code一覧をPython3で見た件とその知見 |
https://qiita.com/SARDONYX/items/b9cfab7ef0edc2f1963d
|
ANSIColorCode一覧をPythonで見た件とその知見すでに既出な題ですが、僕好みなColor一覧がなかったのであえて作成することにしました。 |
2022-02-13 20:55:00 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
AWS認定デベロッパーアソシエイト(DVA)合格までにしたこと |
https://qiita.com/tukky/items/23333573b2e55dc748fa
|
合格までにしたことamp学習時間試験日年月日学習期間年月日年月日学習時間日平均時間学習内容Udemy模擬試験問題集CloudTechポケットスタディAWS認定デベロッパーアソシエイトAWSサービス別資料AWS認定公式模擬試験その他学習前に見てよかったものAWS認定資格SAA試験に落ちたくない人は必見試験テクニックを無料で伝授します【ソリューションアーキテクトアソシエイト試験】SAA試験の動画ですが、学習方法としてどの試験でも共通だと思います。 |
2022-02-13 20:08:11 |
golang |
Goタグが付けられた新着投稿 - Qiita |
Web APIの設計 1/2 |
https://qiita.com/natarisan/items/0e71469796b70ae321f3
|
エンドポイントの設計エンドポイントのメソッドには以下のようなものがあります。 |
2022-02-13 20:44:42 |
Linux |
CentOSタグが付けられた新着投稿 - Qiita |
VirtualBoxでCentOS7.9が起動しなかった |
https://qiita.com/comwing65/items/2924e74b990bf63767f0
|
VirtualBoxでCentOSが起動しなかったKuberetesのローカル環境を構築しようと思い、VirtualBox上にLinuxCentOSの仮想OSを構築しようとした際にハマったメモ多分、原因があまりにも基本的過ぎて検索してもヒットしなかったが、自分と同じ所でハマってしまう人を救済するため、そしてポップアップちゃんへの謝罪のために。 |
2022-02-13 20:07:27 |
海外TECH |
Ars Technica |
Renewables are cheaper than ever—why are household energy bills only going up? |
https://arstechnica.com/?p=1833575
|
market |
2022-02-13 11:22:28 |
海外TECH |
DEV Community |
Spring Kafka Streams playground with Kotlin - V |
https://dev.to/thegroo/spring-kafka-streams-playground-with-kotlin-v-3lko
|
Spring Kafka Streams playground with Kotlin VThis post is the final part of a series where we create a simple Kafka Streams Application with Kotlin using Spring boot and Spring Kafka Please check the first part of the tutorial to get started and get further context of what we re building If you want to start from here you can clone the source code for this project git clone git github com mmaia simple spring kafka stream kotlin git and then checkout v git checkout v and follow from there continuing with this post In this post we re going to use the QuoteStream we created in the last post and use grouping by key to aggregate and count the total volume count per stock quote symbol and also materialize it with windowing so we can create an endpoint and query the local WindowStore to calculate the volume for each instrument in specific intervals We will create an endpoint on our Controller to enable us to expose that information Have fun Grouping and countingIn this part of the series we will use Kafka Streams to keep track of the number of quotes for each key and then expand that to be able to check the number of quotes for a specific interval in time in the finance lingo where a new Quote represent an executed trade this counting is also known as Trade Volume For this part we will use two new topics to store the total count of quotes per symbol and another one to store the total count per interval for that let s start adding the following to the appTopics function on the KafkaConfiguration class so these topics are created for use next time we start the application TopicBuilder name COUNT TOTAL QUOTES BY SYMBOL TOPIC compact build TopicBuilder name COUNT WINDOW QUOTES BY SYMBOL TOPIC build And let s add some configuration we will need to the bottom of KafkaConfiguration class and also move the serdeCofnig from the LeverageStream to the KafkaConfiguration global section so we can re use it in our QuoteStream next const val COUNT TOTAL QUOTES BY SYMBOL TOPIC count total by symbol topic const val COUNT WINDOW QUOTES BY SYMBOL TOPIC count window by symbol topic const val QUOTES BY WINDOW TABLE quotes by window table val serdeConfig MutableMap lt String String gt Collections singletonMap AbstractKafkaSchemaSerDeConfig SCHEMA REGISTRY URL CONFIG SCHEMA REGISTRY URL Now we declare a new Avro type which we will use to store the quotes per window we will be counting create a new file called quote per window avsc and add the following content to it namespace com maia springkafkastream repository type record name QuotesPerWindow fields name symbol type string name startTime type long name endTime type long name count type long Build your project so the new java type is generated mvn clean package DskipTests Grouping and countingWe start by doing a simple total count per symbol and send that to the newly created topic count total by symbol topic so just after the segment where we did the branching in the last post add the following lines group by keyval groupedBySymbol KGroupedStream lt String ProcessedQuote gt resStream groupByKey count and send to compact topic so we can always quickly access the total count by symbolval quotesCount KTable lt String Long gt groupedBySymbol count quotesCount toStream to COUNT TOTAL QUOTES BY SYMBOL TOPIC Produced with Serdes String Serdes Long That s it quite simple this will keep track and count every single different quote by it s key and keep track of total count to test you can run the app and consume messages from the count total by symbol topic and after you send some quotes using the API we created in a previous post you can see the updates on the topic But to be honest in this case having the total count doesn t seem to useful it would be more useful if we could calculate the Trade Volume in specific interval yeah cool let s do that Create a KTable and materialize it so we can then use an endpoint and query the trade volume per symbol per interval in the same QuoteStream quoteKStream method add the following code we could transform it materialize it to be able to query directly from kafkaval quotesWindowedKTable KTable lt Windowed lt String gt Long gt groupedBySymbol windowedBy TimeWindows ofSizeWithNoGrace Duration ofSeconds count Materialized as lt String Long WindowStore lt Bytes ByteArray gt gt QUOTES BY WINDOW TABLE withValueSerde Serdes Long So this piece of code above is storing the count per second interval for each key using a WindowStore which we can then query later to calculate volumes per interval Please make sure you understand the difference and consequence of using KTable vs GlobalKTables specially if you have multiple instances of your client application running To be able to query the created WindowStore we need to declare a ReadOnlyWindowStore and initialize it declare it as an instance variable private lateinit var quotesPerWindowView ReadOnlyWindowStore lt String Long gt And then declare a listener to initialize it Beanfun afterStartQuote sbfb StreamsBuilderFactoryBean StreamsBuilderFactoryBean Listener val listener StreamsBuilderFactoryBean Listener object StreamsBuilderFactoryBean Listener override fun streamsAdded id String streams KafkaStreams quotesPerWindowView streams store StoreQueryParameters fromNameAndType QUOTES BY WINDOW TABLE QueryableStoreTypes windowStore sbfb addListener listener return listener Sweet now that we have an initialized object for this WindowStore let s create a function that calculates the volume based on the quote symbol start and end time specified fun quoteVolumePerInterval key String start Long end Long QuotesPerWindow val listOfCountedQuotes WindowStoreIterator lt Long gt quotesPerWindowView fetch key Instant ofEpochMilli start Instant ofEpochMilli end var totalCountForInterval L listOfCountedQuotes forEach totalCountForInterval it value return QuotesPerWindow key start end totalCountForInterval We can then create a new REST endpoint to expose the volume to simplify we will create one where the callers specifies the minutes from now and we calculate the volume of the past specified volumes for that specific instrument Add the following function to the QuotesController class GetMapping quotes count symbol fun getQuotesPerWindow PathVariable symbol String RequestParam pastMinutes pastMinutes Int ResponseEntity lt QuotesPerWindowDTO gt val end Instant now val start end minusSeconds pastMinutes toLong val quotesPerWindow QuotesPerWindow quoteStream quoteVolumePerInterval symbol start toEpochMilli end toEpochMilli val result QuotesPerWindowDTO symbol quotesPerWindow count start end return ResponseEntity ok result Build and run the application and let s play around with it a bit Create some quotes as before send them to Kafka and with a new client call like the one before check the volume for those quotes in the specified interval GET http localhost api quotes count APPL pastMinutes That s really nice but let s now consider that you might want to calculate those totals and then be able to send them to Elasticsearch or MongoDB for further processing the current KTable doesn t have much context as it s built in Kafka elements like the Windowed store what you want to do in this case is to send this data to a new topic with the total count the interval and the symbol so you can easily plugin a Kafka Connector to Synchronize those count aggregations to your external storage let s do that add the following code to the QuoteStream quoteKStream function just after the KTable definition we did above and then transform and send it to a new topic which we could then use a connector and send to elastic or mongodb for example quotesWindowedKTable toStream map processedQuoteToQuotesPerWindowMapper apply to COUNT WINDOW QUOTES BY SYMBOL TOPIC Produced with Serdes String quotesPerWindowSerde You will get an error at this point due to the missing definition of the processedQuoteToQuotesPerWindowMapper which is a Bifunction which receives as input the the value type of our KTable Windowed lt String gt Long and we than transform it to the Avro type we created earlier so we can send this to a Topic with meaningful context so let s add a property function to represent that transformation and fix the error just after the quotesPerWindowView declaration at the class level add From processed quote to quotes per window var processedQuoteToQuotesPerWindowMapper BiFunction lt Windowed lt String gt Long KeyValue lt String QuotesPerWindow gt gt key value gt val quotesPerWindow QuotesPerWindow key key key window start key window end value KeyValue key key quotesPerWindow And we also need to initialize the Serde we used so add a new PostConstruct function to take care of that PostConstructfun init quotesPerWindowSerde configure serdeConfig false As usual you can checkout the project to this point using git checkout v or just checkout latest main git checkout main have fun That s it it s done you can now play around with it check the content of the new topic and you have a nice Kafka Streams playground to expand and practice Thank you so much to have reached this far this is the end of a very long series of articles took me a lot of effort to do it I really appreciate feedback with issues and typos you will most likely find so I can improve it Constructive suggestions are also Welcome Photo by Kevin Ku on Unsplash |
2022-02-13 11:11:56 |
海外TECH |
Engadget |
You can help two lovelorn hamsters reunite with today’s Google doodle |
https://www.engadget.com/google-valentines-day-doodle-110057796.html?src=rss
|
You can help two lovelorn hamsters reunite with today s Google doodleGoogle s tradition of dropping little interactive games for holidays and special occasions shows no signs of stopping for Valentine s Day Today s doodle features two hamsters whose love knows no bounds that is except for the treacherous maze separating them that is in the shape of Google s logo Your mission is to help these two crazy kids reunite by pulling a series of levers and switches until Google s logo is complete Is this game as difficult as today s Wordle Not even close Will it take you roughly seconds to complete maybe even a minute if you re half paying attention because you re watching the Super Bowl Most likely But the good news is it s a cute distraction that will get you into the Valentine s Day spirit and is appropriate for kids If you want more be sure to check out Google s other doodle games There s a particularly fun one involving pizza Pac Man one where you try to draw something before Google s neural network outsmarts you and one where you assist a cat with a magic wand take down some nocturnal spirits Incredible You can play Google s Valentine s Day doodle by visiting its homepage and you can see all of Google s past doodles here |
2022-02-13 11:00:57 |
海外TECH |
CodeProject Latest Articles |
Deep dive into WPF layouting and rendering |
https://www.codeproject.com/Articles/5324971/Deep-dive-into-WPF-layouting-and-rendering
|
deep |
2022-02-13 11:08:00 |
海外ニュース |
Japan Times latest articles |
Protesters flood Ottawa, and a border bridge is still blocked in Ontario |
https://www.japantimes.co.jp/news/2022/02/13/world/politics-diplomacy-world/covid-19-protesters-flood-ottawa/
|
Protesters flood Ottawa and a border bridge is still blocked in OntarioBy Saturday night the Ambassador Bridge a key crossing at the U S Canada border was still closed Protesters in Ottawa the capital vastly outnumbered the police |
2022-02-13 20:15:47 |
ニュース |
BBC News - Home |
Steve Barclay: PM's new chief of staff pledges smaller state |
https://www.bbc.co.uk/news/uk-politics-60366086?at_medium=RSS&at_campaign=KARANGA
|
needs |
2022-02-13 11:02:24 |
ニュース |
BBC News - Home |
Sadiq Khan: New Met boss must have robust plan on culture problems |
https://www.bbc.co.uk/news/uk-england-london-60365947?at_medium=RSS&at_campaign=KARANGA
|
cultural |
2022-02-13 11:14:10 |
北海道 |
北海道新聞 |
五輪マスコットの雪像も 張家口でボランティア |
https://www.hokkaido-np.co.jp/article/645227/
|
雪像 |
2022-02-13 20:18:00 |
北海道 |
北海道新聞 |
クライミング、森秋彩が3連覇 ジャパン杯、男子は本間大晴V |
https://www.hokkaido-np.co.jp/article/645226/
|
高さ |
2022-02-13 20:17:00 |
北海道 |
北海道新聞 |
失踪から1年「安らかに」 旭川中2死亡 |
https://www.hokkaido-np.co.jp/article/645224/
|
疑い |
2022-02-13 20:10:48 |
北海道 |
北海道新聞 |
上川管内で174人感染 新型コロナ |
https://www.hokkaido-np.co.jp/article/645175/
|
上川管内 |
2022-02-13 20:05:31 |
北海道 |
北海道新聞 |
東野幸治さんがコロナ感染 吉本興業、博多華丸さんも |
https://www.hokkaido-np.co.jp/article/645220/
|
博多華丸 |
2022-02-13 20:02:05 |
海外TECH |
reddit |
【独自】ゆっくり×嫌韓動画の視聴回数が合計2億6千万回を超えることが判明(ワイ調べ) |
https://www.reddit.com/r/newsokuexp/comments/srgbkr/独自ゆっくり嫌韓動画の視聴回数が合計2億6千万回を超えることが判明ワイ調べ/
|
【独自】ゆっくり×嫌韓動画の視聴回数が合計億千万回を超えることが判明ワイ調べYouTube上で蔓延ってる、「ゆっくり」を使用した嫌韓動画チャンネルの総再生回数を計算してみたところ、回にもにも上った月日時点。 |
2022-02-13 11:04:59 |
コメント
コメントを投稿