投稿時間:2021-12-10 01:36:21 RSSフィード2021-12-10 01:00 分まとめ(50件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 次期「iPhone SE」の来年前半発売に向け、サプライヤーは出荷準備を進めている模様 https://taisy0.com/2021/12/10/149572.html apple 2021-12-09 15:56:38
python Pythonタグが付けられた新着投稿 - Qiita Pythonを使ってTwitterに時間指定して投稿 https://qiita.com/YakitoriBoyz/items/efcee92d654437b5a86a Twitter自体には予約投稿という機能がありますが、APIを叩いて予約投稿はできなさそう多分だったので、Schedulerを用いて強引ですが予約投稿を実装しました。 2021-12-10 00:12:32
python Pythonタグが付けられた新着投稿 - Qiita 「あれ? 家の鍵かけたっけ?」から安全に開放されるための技術 https://qiita.com/matagawa/items/1bbc4ae44122e4aee8fe TLDR家から離れたら玄関を自動的に施錠する仕組みを作りました一定時間後に施錠するようなオートロックには幾つかの問題がありますスマホのアプリによって位置情報を活用したオートロックは電池が心配ですこの記事ではスマホにアプリを入れることなく家から離れたら自動で施錠するような安全なオートロックを目指しますできるだけオンプレに設備を用意せずにクラウドで完結する仕組みにしました背景廃車寸前の車を知人から円で譲り受け、サビを削り塗装を塗り直し、新型コロナ渦における貴重な移動手段として活用し始めましたわたしはよく「玄関の鍵かけたっけ」と心配する性格なのですが、徒歩ならともかく、車で出発した後にわざわざ家に戻るのは大変面倒ですそこでスマートロックSESAMEを取り付けてみました「分で自動的に施錠する」オートロック機能が備わって大変喜びました喜んだのもつかの間、大事件が起こりました玄関先でゴミ捨て作業をしていたら家から締め出されました鍵もないスマホもない状態のため、本当にひどい目にあいましたマスクも着けていない私に固定電話を貸してくださった御近所の方に、この場を借りて心からお礼申し上げます解決したい問題世の中のスマートロックは「オートロック」の機能を備えていますが、一定時間解錠されていることをトリガにしていることが殆どですそのためドアが実際には閉じられていないのに鍵だけ回ってしまう場合や、時間によって問答無用で施錠されてしまうなど、意図しない「施錠」状態を作ってしまうことがありますそこで今回は時間によらず「ある程度家から離れた」ことをトリガにする仕組みを簡単に作ってみます先行事例では、スマホを活用する例が多く見つかりましたたとえばメーカーが提供するアプリが定期的に位置情報を確認して施錠してくれたり、Taskerを使った自動化などしかしスマホの電池がガリガリ削られていくのが心配なので、できるだけスマホに頼らない方法を考えたいと思いますAtAGlance課題を解決する技術製品BLEScannerCiscoMerakiCiscoMerakiはクラウド管理型ネットワーク製品です。 2021-12-10 00:06:56
python Pythonタグが付けられた新着投稿 - Qiita [並列処理] 大量なS3オブジェクトのダウンロード時間を短縮する https://qiita.com/u0suke87/items/f8acdcfb49a47ff506d8 「LambdaがSからGetObjectするのにかかる時間を計測してみた」の記事でまとめられている通り、Sからデータを落としてくるのに、kBのデータサイズであっても、数秒は要してしまいます。 2021-12-10 00:09:42
js JavaScriptタグが付けられた新着投稿 - Qiita Raspberry PiにNode.jsのインストールをして起動時に自動実行させるまで https://qiita.com/n0bisuke/items/072b9ba68fc812387526 pmunstartupsystemdまとめvimをインストールしておくnodebrew経由でNodejsをインストールPMで永続化amp自動起動設定という流れで個人的によく使うラズパイ運用はカバーできそうな気がしました。 2021-12-10 00:45:19
js JavaScriptタグが付けられた新着投稿 - Qiita Next2D NoCode ToolでJavaScriptを使う[上級編] https://qiita.com/ienaga/items/31814cca5693e5e8526c 例えばkeyをNumberので取得した場合と、Stringので取得した場合では戻り値が異なります。 2021-12-10 00:18:05
js JavaScriptタグが付けられた新着投稿 - Qiita 【Rails】escape_javascriptメソッド【jQuery】 https://qiita.com/P-man_Brown/items/252e23892229b61575ab 疑問点についての解説結論JavaScriptファイルの中ににHTMLを記述するときに実行結果をエスケープするためのメソッドエスケープ処理とはエスケープ処理とは、記述したコードのままでは意図した通り表現できない文字列や改行を表現するために使用する、代替文字列処理のことです。 2021-12-10 00:12:37
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) [Unity2D]シングルトン以外で,ボタンをクリックすることで,ゲームマネージャーにアクセスする方法が知りたいです. https://teratail.com/questions/373109?rss=all 2021-12-10 00:50:51
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) _src.type() == CV_8UC1 in function 'equalizeHist'について https://teratail.com/questions/373108?rss=all srctypeCVUCinfunctionxequalizeHistxについて前提・実現したいことRGB画像にガウシアンノイズを加え、特徴量画像を抽出し、ヒストグラム平坦化をした画像を得ようとしています。 2021-12-10 00:22:55
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) xamppでmySQL phpからの接続方法とパスワードの設定 https://teratail.com/questions/373107?rss=all 2021-12-10 00:06:45
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) C言語の問題を解いているが、何度もエラーが出てしまう(原因不明) https://teratail.com/questions/373106?rss=all C言語の問題を解いているが、何度もエラーが出てしまう原因不明C言語の問題で条件①A回株の売買を行うとする株価がB以上なら売りC以下なら買いBとCの間なら何もしないA回目は株の株価に関わらずすべて売る。 2021-12-10 00:06:41
Ruby Rubyタグが付けられた新着投稿 - Qiita RubyでSlackのbotをつくる2021:Socket Mode編 https://qiita.com/rutan/items/3bd89cc8d133887c3922 SlackAppは非常に高機能なため、最初の取っ掛かりになれば……対象読者SlackのbotをRubyで書きたいSlackのAPIの気持ちを知りたいSocketModeが追加されたのは知ってるが、RTMAPIに甘えてmmもキャッチアップできてない先月までの僕ですこの記事で取り扱う範囲RubyでSocketModeの接続RubyでSocketModeで実際にイベントを受け取るRubyでSocketModeでボタンとモーダルを利用するおまけSlackbotライブラリを作った話※Ruby固有の話はあまりありませんSlackbotをつくる方法前提部分の話のため、実装部分だけを見たい場合はこのセクションはskipしてOKです定番は公式の「Bolt」TheBoltfamilyofSDKsSlackJavaScriptPythonJava向けに、Slack公式ライブラリとしてBoltが提供されています。 2021-12-10 00:32:00
AWS AWSタグが付けられた新着投稿 - Qiita クラウドサービスとは https://qiita.com/Ryo2021/items/4e5073cfdfa3ab4cf526 こうした保守費用も高額になることが多いです。 2021-12-10 00:17:57
golang Goタグが付けられた新着投稿 - Qiita GraphQL(gqlgen)でのエラー定義とエラーコード化 https://qiita.com/Ranks/items/e71102301f3ff8f9d4b0 どちらも有効期限切れなため、同じエラーコードでも良さそうですが、サービスが違うためエラーコードがFirebaseの例を使用するとaidtokenexpiredbidtokenexpiredのように複数設定する必要があります。 2021-12-10 00:54:48
GCP gcpタグが付けられた新着投稿 - Qiita クラウドサービスとは https://qiita.com/Ryo2021/items/4e5073cfdfa3ab4cf526 こうした保守費用も高額になることが多いです。 2021-12-10 00:17:57
Azure Azureタグが付けられた新着投稿 - Qiita ネットワーク制限をかけたストレージアカウントにアクセスする方法 https://qiita.com/ryuseiarai/items/c0f99ae7ef8e2b4bc161 仮装ネットワークこちらはVNET内のサービスエンドポイントを利用して接続するための設定です。 2021-12-10 00:56:47
Azure Azureタグが付けられた新着投稿 - Qiita クラウドサービスとは https://qiita.com/Ryo2021/items/4e5073cfdfa3ab4cf526 こうした保守費用も高額になることが多いです。 2021-12-10 00:17:57
Ruby Railsタグが付けられた新着投稿 - Qiita 【Rails】escape_javascriptメソッド【jQuery】 https://qiita.com/P-man_Brown/items/252e23892229b61575ab 疑問点についての解説結論JavaScriptファイルの中ににHTMLを記述するときに実行結果をエスケープするためのメソッドエスケープ処理とはエスケープ処理とは、記述したコードのままでは意図した通り表現できない文字列や改行を表現するために使用する、代替文字列処理のことです。 2021-12-10 00:12:37
技術ブログ Mercari Engineering Blog メルカリWeb版のPull Request環境の構築方法について https://engineering.mercari.com/blog/entry/20211209-a41d2dcfd3/ hellip 2021-12-09 16:07:09
技術ブログ Mercari Engineering Blog merpay Tech Talk 〜 2000万MAUを支える決済基盤の現状と未来〜 を開催しました! #merpay_techtalk https://engineering.mercari.com/blog/entry/20211209-f359c9f121/ youtuhellip 2021-12-09 15:16:35
技術ブログ Developers.IO Snowflakeのコスト確認方法をまとめてみる #SnowflakeDB https://dev.classmethod.jp/articles/snowflake-summary-cost-check/ adventcalendar 2021-12-09 15:30:46
技術ブログ Developers.IO Cloudflare Workers + KV でリダイレクトを実装してみる https://dev.classmethod.jp/articles/cloudflare-workers-kv-redirect/ cloudflareworkerskv 2021-12-09 15:01:02
海外TECH MakeUseOf How to Create Playlists to Organize Your Games on GOG Galaxy https://www.makeuseof.com/gog-galaxy-how-to-organize-games/ galaxy 2021-12-09 15:45:32
海外TECH MakeUseOf The 9 Best Color by Number Apps for Android https://www.makeuseof.com/paint-by-number-apps-android/ android 2021-12-09 15:30:12
海外TECH MakeUseOf How to Build and Send a Custom HTML Email https://www.makeuseof.com/build-and-send-html-email/ gmail 2021-12-09 15:16:21
海外TECH DEV Community Create a weight converter with Javascript https://dev.to/devrohit0/create-a-weight-converter-with-javascript-1ngb Create a weight converter with JavascriptHello Everyone Today we re going to create a Weight Converter with the help of basic JavaScript If you re a beginner then this article may be useful for you Our Weight Converter will look like this For this project we use Bootstrap classes If in any case you don t know about Bootstrap then no problem you can easily style this web page with CSS from scratch Add the following code within the lt head gt lt link rel stylesheet href integrity sha rwoIResjUyczGV NPeZWAvrSmLldCR AZzGRnGxQQKnKkoFVhFQhNUwEyJ crossorigin anonymous gt HTML lt body gt lt div class container gt lt div class row gt lt div class col md offset md gt lt h class display text center mb gt Weight Converter lt h gt lt form gt lt div class form group gt lt input type number class form control form control lg placeholder Enter Pounds id lbsInput gt lt div gt lt form gt lt div id output gt lt div class card card primary mb gt lt div class card block gt lt h gt Grams lt h gt lt div id gramsOutput gt lt div gt lt div gt lt div gt lt div class card card success mb gt lt div class card block gt lt h gt Kilograms lt h gt lt div id kgOutput gt lt div gt lt div gt lt div gt lt div class card card danger mb gt lt div class card block gt lt h gt Ounces lt h gt lt div id ozOutput gt lt div gt lt div gt lt div gt lt div gt lt div gt lt div gt lt div gt CSSbody margin top px background color ffffff output visibility hidden input type number width JavaScriptThis part is also easy Our code contains only lines of code document getElementById lbsInput addEventListener input function e let lbs e target value let input document getElementById lbsInput let data input value document getElementById gramsOutput innerHTML lbs document getElementById kgOutput innerHTML lbs document getElementById ozOutput innerHTML lbs document getElementById output style visibility visible if data document getElementById output style visibility hidden I hope you will love it If you love it then support me 2021-12-09 15:57:28
海外TECH DEV Community Bootstrap: Use Responsive Design with Bootstrap Fluid Containers https://dev.to/rthefounding/bootstrap-use-responsive-design-with-bootstrap-fluid-containers-4kco Bootstrap Use Responsive Design with Bootstrap Fluid ContainersFreeCodeCamp is an extremely beneficial tool that I ve been using throughout these months As you seen I m learning just like you are I provide help solutions as much as I can give Programming is something that you truly have to commit to The time and effort you put into it the urge to continue learning and getting it right To have that knowledge and help others is incredible Now that onwards During my first week or so of FreeCodeCamp In the HTML section we built a Cat Photo App We re coming back to it to style it with Bootstrap responsive CSS framework Bootstrap will figure out how wide your screen is and respond by resizing your HTML elements meaning there s need to design a mobile version of it You can add Bootstrap to any app by adding the following code to the top of your HTML lt link href rel stylesheet type text css gt lt style gt red text color red h font family Lobster Monospace p font size px font family Monospace thick green border border color green border width px border style solid border radius smaller image width px lt style gt lt div class container fluid gt lt h class red text gt CatPhotoApp lt h gt lt p gt Click here for lt a href gt cat photos lt a gt lt p gt lt a href gt lt img class smaller image thick green border src alt A cute orange cat lying on its back gt lt a gt lt p gt Things cats love lt p gt lt ul gt lt li gt cat nip lt li gt lt li gt laser pointers lt li gt lt li gt lasagna lt li gt lt ul gt lt p gt Top things cats hate lt p gt lt ol gt lt li gt flea treatment lt li gt lt li gt thunder lt li gt lt li gt other cats lt li gt lt ol gt lt form action gt lt label gt lt input type radio name indoor outdoor gt Indoor lt label gt lt label gt lt input type radio name indoor outdoor gt Outdoor lt label gt lt label gt lt input type checkbox name personality gt Loving lt label gt lt label gt lt input type checkbox name personality gt Lazy lt label gt lt label gt lt input type checkbox name personality gt Crazy lt label gt lt input type text placeholder cat photo URL required gt lt button type submit gt Submit lt button gt lt form gt lt div gt 2021-12-09 15:52:38
海外TECH DEV Community How to Build a Todo app with Svelte! https://dev.to/avneesh0612/how-to-build-a-todo-app-with-svelte-24b0 How to Build a Todo app with Svelte DemoVideo demo Setup Create appnpx degit sveltejs template svelte todo app cd into the folder cd svelte todo app Install dependenciesnpm install npmyarn install yarn Start appnpm run dev npmyarn dev yarn CleanupI don t want the default stylings so I will replace the stylings in globals css with this margin body margin font family apple system BlinkMacSystemFont Segoe UI Roboto Oxygen Ubuntu Cantarell Fira Sans Droid Sans Helvetica Neue sans serif webkit font smoothing antialiased moz osx font smoothing grayscale code font family source code pro Menlo Monaco Consolas Courier New monospace Building the containerIn App svelte let s create the starter code for our app lt script gt lt script gt lt main class container gt lt main gt lt style gt container display flex flex direction column align items center min height vh background e url ixlib rb amp auto format amp fit crop amp w amp q no repeat background size cover padding top vh lt style gt Building the form to submit TodosInside our main container add a form component with input and button lt main class container gt lt div gt lt form on submit preventDefault addTodo gt lt input bind value newItem type task class todos input placeholder Enter Todo gt lt button class todos button gt lt button gt lt form gt lt div gt lt main gt We need to create the following things now A variable to store the input valueA addTodo function for adding the todos So in the script tag add the following let newItem let todoList function addTodo if newItem todoList todoList task newItem completed false newItem console log todoList StylingNow let s style our submit button and the input Inside the styles tag add this todos input background color inherit border none box shadow none text decoration none font size rem border bottom px solid black margin top px outline none width px todos button background color inherit border none box shadow none font size rem cursor pointer If we now add an item it will add the item to the list and console log it Rendering the todosIn React like we have a map function we do it through each in Svelte each todoList as item index lt div class todo gt lt span class todo text gt item task lt span gt lt div gt each Styling the todos todo display flex padding px border radius px box shadow px rgb background color hsla webkit backdrop filter blur px backdrop filter blur px width inherit margin top px font size rem justify content space between align items center This will give the todos a glassmorphic look Adding a header for the todosThe to do list and the inputs look kinda clumsy so let s add a header there After the form component add this h tag lt h class todos listHeader gt Todos lt h gt The stylings for this header todos listHeader text align center padding px border radius px box shadow px rgb background color hsla webkit backdrop filter blur px backdrop filter blur px margin px px px px font size rem Now we have got a pretty good separation there Creating the complete and delete functionalityWe are going to use icons for delete and complete so let s get the icons first Create Icons svelte file in the src directory Add the following piece of code for the icons Feel free to change the icons lt script gt export let name export let width rem export let height rem export let focusable false let icons box name check mark svg lt svg focusable false viewBox aria hidden true gt lt path d M l L l L m L l L l L z gt lt path gt lt svg gt box name delete svg lt svg focusable false viewBox aria hidden true gt lt path d M c hc VHvzM hvHVzm l h l HvhVh z gt lt path gt lt svg gt let displayIcon icons find e gt e name name lt script gt lt svg class props class focusable width height viewBox displayIcon box displayIcon box gt html displayIcon svg lt svg gt Show the iconsInside the todo I will add a div with two buttons that have the icons as follows each todoList as item index lt div class todo gt lt span class todo text gt item task lt span gt lt div class icons gt lt button class icon button on click gt item completed item completed gt lt Icons name check mark class icon gt lt button gt lt button class icon button on click gt removeFromList index gt lt Icons name delete class icon gt lt button gt lt div gt lt div gt each Import the icons like this import Icons from Icons svelte Creating the delete function function removeFromList index todoList splice index todoList todoList Styling the buttonsAdd the following styles to get a beautiful icon button icon button background color transparent border none box shadow none font size rem cursor pointer color rgba icon background rgba Striking the TextAdd this optional class to the item task span so if the item is completed then it will add the class lt span class todo text item completed todo checked strike gt item task lt span gt Now we need to add the styles to strike it todo checked strike text decoration line through This function takes an argument of index and splices the todoList to remove the item We have successfully built a to do app in Svelte To extend your knowledge about svelte check out this video by James Q Quick where he will show you how to create a todo app with Sveltekit and tailwind CSS Useful linksGithub RepositoryDemoJames channelConnect with Me 2021-12-09 15:34:28
海外TECH DEV Community Building a ClickHouse visualization with Altinity and Cube https://dev.to/cubejs/building-a-clickhouse-visualization-with-altinity-and-cube-5o9 Building a ClickHouse visualization with Altinity and CubeI like counting stars Especially stars on GitHub Tracking the growth of popular GitHub repositories has always been interesting to me That s why I decided to use the public data set of GitHub events in ClickHouse to create dashboards with actionable metrics In this tutorial I ll explain how to build a custom front end visualization that fetches data from a ClickHouse instance I ll use a managed instance of ClickHouse from Altinity Cloud and Cube Cloud as the metrics API layer If you would like to use a low code solution like Apache Superset check out this article by my co worker Igor Here s what the metrics dashboard app will look like once I m done You can also look at a live preview How I ll Build a ClickHouse VisualizationI want to use the public GitHub Events dataset that represents data from all events that are generated by GitHub since This data has more than billion elements Pretty massive isn t it To handle all this data I want to use ClickHouse It s a powerhouse of a database for building analytics apps ClickHouse is also often used for metrics storage Most commonly in conjunction with other databases to materialize views for metrics However I don t want to waste time and my own nerves on running the infra myself I m a developer why should I I d much rather have a managed ClickHouse instance configured by professionals Altinity fits my needs perfectly I get a managed service for ClickHouse with all the features I need without worrying about scaling the infrastructure Even though ClickHouse is lightning quick I still need an API to consume the data and display it on metrics dashboards I ll use Cube Cloud as the metrics layer to generate queries for my analytics Cube is an analytics API for building data apps With all that out of the way let me explain my reasoning behind my decisions What is ClickHouse ClickHouse is a fast open source column oriented database management system that allows generating analytical data reports in real time using SQL queries It uses a columnar storage engine that enables it to have high performance for analytical queries The success of ClickHouse and the huge adoption have led to a million series B investment ClickHouse delivers high query processing speed and data storage efficiency It s capable of processing more than PBs of data with more than billion records inserted every day There are a few different ways to run ClickHouseLocally or on bare metal Cloud providers like AWS Google Cloud Platform etc Y CloudAltinityThe simplest solution I ultimately decided to use is Altinity Let me explain why What is Altinity Altinity Cloud is a fully managed service for ClickHouse by ClickHouse Enterprise Experts It runs in the region where your apps are located not the region that s convenient for Altinity I can pick any AWS or GCP region and the folks over at Altinity will make it work for me Active regions are available for immediate deployment If I need a new region I just ask and they make it available in a couple of days Pretty awesome I can spin up clusters connect and start working right away They provide vertical and horizontal scaling as well High availability is also enabled by default I get multi AZ operation and automatic backup I also get automatic upgrades without interrupting service Lastly monitoring is part of the package deal as well Sweet deal in my book I can focus all my effort on creating value instead of managing infrastructure With all of that out of the way let s jump into creating a ClickHouse cluster on Altinity Cloud Set Up a ClickHouse Cluster on Altinity CloudThe signup process is simple First go to the test drive page on Altinity Then add your info and ask the Altinity team to spin up a ClickHouse cluster for you After waiting a while you ll get a dedicated cluster with your own sign in credentials Go ahead and sign in with your credentials You ll land on the clusters page The next step is to create a cluster Click on the Launch Cluster button to open the Cluster Launch Wizard Select your preferred configuration and hit next Make sure to also configure the connection configuration The final step is to launch the cluster You will get an overview of the estimated cluster cost before moving on to launching the cluster Once you hit Launch you ll have to wait a bit for the cluster to spin up Once it is up and running it ll look like this Sweet I have a running cluster Let s pop some data into it Import GitHub Events Data into Your ClickHouse ClusterThere are a few ways you can import the GitHub Events dataset I suggest downloading the dataset directly into ClickHouse First edit the profile for your user to enable the import You ll need to set the max http get redirects value to a high number I decided to go with just to keep it safe To connect to the ClickHouse instance install clickhouse client and create a clickhouse client xml file with the configuration parameters from Altinity The parameters you need in order to use the clickhouse client are Host lt team gt lt company gt altiinty cloudPort User admin or the user you configuredPassword the password used for the current userThe clickhouse client xml file should look like this cat clickhouse client xml lt config gt lt host gt your team your company altinity cloud lt host gt lt user gt admin lt user gt lt password gt xxxxxxxxxxxxx lt password gt lt secure gt True lt secure gt lt port gt lt port gt lt config gt In the same directory where you saved the clickhouse client xml file run this command clickhouse clientOnce connected create a foreign table that will read data from a URL CREATE TABLE github events url file time DateTime event type Enum CommitCommentEvent CreateEvent DeleteEvent ForkEvent GollumEvent IssueCommentEvent IssuesEvent MemberEvent PublicEvent PullRequestEvent PullRequestReviewCommentEvent PushEvent ReleaseEvent SponsorshipEvent WatchEvent GistEvent FollowEvent DownloadEvent PullRequestReviewEvent ForkApplyEvent Event TeamAddEvent actor login LowCardinality String repo name LowCardinality String created at DateTime updated at DateTime action Enum none created added edited deleted opened closed reopened assigned unassigned labeled unlabeled review requested review request removed synchronize started published update create fork merged comment id UInt body String path String position Int line Int ref LowCardinality String ref type Enum none branch tag repository unknown creator user login LowCardinality String number UInt title String labels Array LowCardinality String state Enum none open closed locked UInt assignee LowCardinality String assignees Array LowCardinality String comments UInt author association Enum NONE CONTRIBUTOR OWNER COLLABORATOR MEMBER MANNEQUIN closed at DateTime merged at DateTime merge commit sha String requested reviewers Array LowCardinality String requested teams Array LowCardinality String head ref LowCardinality String head sha String base ref LowCardinality String base sha String merged UInt mergeable UInt rebaseable UInt mergeable state Enum unknown dirty clean unstable draft merged by LowCardinality String review comments UInt maintainer can modify UInt commits UInt additions UInt deletions UInt changed files UInt diff hunk String original position UInt commit id String original commit id String push size UInt push distinct size UInt member login LowCardinality String release tag name String release name String review state Enum none approved changes requested commented dismissed pending ENGINE URL native xz Native Next create the destination table and insert the data CREATE TABLE github events ENGINE MergeTree ORDER BY event type repo name created at AS SELECT FROM github events url This will take a while Roughly GBs need to be imported I suggest grabbing a coffee Run a simple select query to make sure the data is completely imported You should see around billion rows SELECT count FROM github events┌ーcount ー┐│ │└ー┘Nice you have all the data imported It should all be around GB in total You can check the cluster page to confirm If you want to play with the GitHub Events data without having to import your own dataset you can use the Altinity demo cluster The clickhouse client xml should look like this lt config gt lt host gt github demo altinity cloud lt host gt lt user gt demo lt user gt lt password gt demo lt password gt lt secure gt True lt secure gt lt port gt lt port gt lt config gt From here on out in this tutorial I ll continue using the Altinity demo cluster for all the examples Writing Analytical ClickHouse Queries in AltinityNext up time to write a few analytical queries First I want to know the top starred repositories SELECT repo name count AS starsFROM github eventsWHERE event type WatchEvent GROUP BY repo nameORDER BY stars DESCLIMIT Query id dcdce dde a a cdfdaca┌ーrepo nameー┬ーstarsー┐│ icu ICU │ ││ FreeCodeCamp FreeCodeCamp │ ││ vuejs vue │ ││ facebook react │ ││ kamranahmedse developer roadmap │ ││ sindresorhus awesome │ ││ tensorflow tensorflow │ ││ jwasham coding interview university │ ││ getify You Dont Know JS │ ││ freeCodeCamp freeCodeCamp │ │└ー┴ー┘ rows in set Elapsed sec Processed million rows GB million rows s GB s Writing complex queries like this one is not simple if you re a developer like me Ideally I d want a tool to act as a metrics layer so I can generate charts and graphs without having to write any SQL myself I also wouldn t mind configuring role based access rights and security as well Cube makes all of this easy Let me show you Set Up a Cube App in Cube CloudWith Cube you get a centralized metrics layer with SQL generation auto scaling and much more I m a developer I d love to get all my SQL generated for me Let me show you how to set up Cube Cloud After signing up create a deployment Select the ClickHouse database integration Add the values from your ClickHouse database The database in Altinity Cloud will be named default Next generate a schema from the github events table You don t need to generate the schema but I suggest you do as it simplifies your life significantly Once the deployment spins up you get an overview of all resources Making Cube Cloud a Metrics LayerLet s have a look at the autogenerated schema Switch to the Schema tab and click the GithubEvents js file I love starting with a base like this From here it s easy to add more complex measures and dimensions to create your own custom metrics layer Let me start by showing you how to add a new dimension Let s call it eventType eventType sql event type type string In the GithubEvents js it will look like this after adding the dimension After you save and commit this change open up the playground and run the same query as you ran in Altinity directly Awesome However writing this complex filter is cumbersome Let s add a segment instead segments watchEvents sql CUBE event type WatchEvent Paste it just below the joins section This will give you a predefined filter so you don t have to fiddle around with defining filters in the Cube query Using this logic you can mix and match any desired measures and dimensions to generate metrics charts for your own analytics Cube also provides you with all the code you would need to drop this chart into your own front end app You can choose from using React Vue Angular Vanilla JavaScript for the library integration with the option to use BI as well We call this brand new feature SQL API Read more about it here The chart itself can be chosen from Chart js Bizcharts Recharts or D The option is entirely your own Cube is agnostic and lets you pick whichever you want To use the autogenerated chart code click on the Code tab copy paste the code and you re done Works like magic You can also use Cube s built in feature for generating metrics dashboards I took the liberty of creating one for you to check out Here s the end result You now know how to generate metrics on your own Let s move on to security and role based access Adding Multi Tenancy to Cube CloudCube supports multi tenancy out of the box You can choose to enable it on both the database and data schema levels To enable role based access with row level security I ll use a context object It has a securityContext property where you can provide all the necessary data to identify a userBy default the securityContext is defined by Cube js API Token Start by copying the CURL command with the Authorization token Here s what you get curl H Authorization eyJhbGciOiJIUzINiIsInRcCIIkpXVCJ eyJpYXQiOjEMzgOTgxMTJ LQndUacUQAZpLUjxRV tWnPZheWYMhxGzrcsSlrbg G data urlencode query measures GithubEvents count https inland caratunk aws eu central cubecloudapp dev cubejs api v loadNow copy only the token and paste it into the JWT io web token validator to see it does not contain any payload On the right side add in a payload for role stars and add your Cube app s secret to generate a valid Authorization token You can find your Cube app s secret in the env vars section in the settings of your deployment Now you have a valid token containing a payload with role stars Let s use the securityContext and queryRewrite in the cube js file to add a filter for the stars role I want the role to only be able to query events of the type WatchEvent In your cube js file add this code module exports queryRewrite query securityContext gt if securityContext role throw new Error No role found in Security Context if securityContext role stars query filters push member GithubEvents eventType operator equals values WatchEvent return query In Cube Cloud it ll look like this Save commit and push the changes Run the CURL command once again with the new token curl H Authorization eyJhbGciOiJIUzINiIsInRcCIIkpXVCJ eyJybxlIjoicRhcnMiLCJpYXQiOjEMzgOTEyNjN bkWPLNdP gjC KqkxRLM ABzqVGetZvbYvc G data urlencode query measures GithubEvents count https inland caratunk aws eu central cubecloudapp dev cubejs api v loadThe output will be filtered to only show the events of type WatchEvent query measures GithubEvents count timezone UTC order filters member GithubEvents eventType operator equals values WatchEvent dimensions timeDimensions data GithubEvents count lastRefreshTime T Z annotation measures GithubEvents count title Github Events Count shortTitle Count type number drillMembers GithubEvents repoName GithubEvents title GithubEvents commitId GithubEvents originalCommitId GithubEvents releaseTagName GithubEvents releaseName GithubEvents createdAt GithubEvents updatedAt drillMembersGrouped measures dimensions GithubEvents repoName GithubEvents title GithubEvents commitId GithubEvents originalCommitId GithubEvents releaseTagName GithubEvents releaseName GithubEvents createdAt GithubEvents updatedAt dimensions segments timeDimensions dataSource default dbType clickhouse extDbType cubestore external false slowQuery false By using the securityContext you can ensure your app s access rights and security including row level security for your ClickHouse database To learn more check out our recipe on using role based access ConclusionMy goal with this tutorial was to explain a simpler and safer way of using ClickHouse By using Altinity Cloud to host and manage your ClickHouse cluster you can focus on what s important and leave infrastructure management to the professionals With Cube Cloud you get a metrics layer that integrates with every major data visualization library including SQL compatible charting tools like Apache Superset On top of all that it also comes with multi tenancy support out of the box Among the different multi tenancy options you can enable tenant based row level security role based access using multiple database instances multiple schemas and more I hope this walkthrough helped you set up your own ClickHouse instance with Altinity Cloud and Cube Cloud If you want to learn more about building a metrics store with Cube check out our tutorial that explains using Cube as a single source of truth for all metrics You can register for Cube Cloud right away and check out Altinity as well I d love to hear your feedback about using ClickHouse with Cube Cloud in the Cube Community Slack  Click here to join Until next time stay curious and have fun coding Also feel free to leave Cube a on GitHub if you liked this article ️ 2021-12-09 15:31:19
海外TECH DEV Community React practices for Beginners https://dev.to/harishash/react-practices-for-beginners-djn React practices for BeginnersReact is arguably one of the most used Frameworks out there today and everyday people are opting this framework for its UI first approach It s safe to say that the React Library and the whole ecosystem has matured over the years and is still growing So here are some practices that you can opt and avoid while getting comfortable in the React bubble Importing Order Code readability is something that every developer should take care of and importing everything in order can help a lot with this Usually its a good practice to import in the following order Built inInternalExternal JSX without Parentheses Always wrap a component in parentheses if it crosses more than one line Ternary Operators To reduce the amount of lines in your code you can opt for Ternary operators if the condition involves two values Function inside Render The best practice would be to keep the logic inside the renderer to a bare minimum and avoid defining a function in there as well Fragment In order to save the Virtual DOM from creating unnecessary nodes always go for a Fragment instead of Div Just remove div from lt div gt and you re left with a fragment i e lt gt Reserved Prop Naming Avoid the use of DOM component prop names when you have to pass props between as these names might not be expected by the others Memo To help the compiler avoid unnecessary rendering you can go with Memo and React PureComponent It will drastically improve the overall performance of your application CSS outside Javascript Most of the developers know that organizing CSS is harder than Javascript so its best to avoid the use of raw Javascript during the development phase of React Apps Template Literals For a nice and clean code try using template literals for large strings It can also reduce the string concentration in your code Explicit return Prioritize writing beautiful and easy to understand code Instead of adding return you can use Javascript s implicit return to format your code in a nice way ConclusionSo this wraps up my personal picks for the best Practices for beginners starting out with React Framework Let me know your favorites Happy Developing 2021-12-09 15:25:10
海外TECH DEV Community Javascript Project - How to make unsplash clone | Unsplash API https://dev.to/kunaal438/javascript-project-how-to-make-unsplash-clone-unsplash-api-4okg Javascript Project How to make unsplash clone Unsplash APIHello guys In today s article you ll learn to create this unsplash clone If you don t know what unsplash is unsplash is a website company which offers royalty free images for personal or business use We ll today create this website using unsplash API It s a great javascript project for beginner So without wasting more time let s start To see project demo or you want a video tutorial You can watch the tutorial below Video TutorialI appreciate if you can support me by subscribing my youtube channel Source Code CodeSo let s start with our folder structure You can see the files we ll use below So let s make our home page first Home Page Header SectionIn our home page we have a beautiful header section To create that Open index html file Inside that code these elements lt header class header section gt lt div class header content gt lt h class logo gt logo lt h gt lt p class sub line gt the best royalty free images you can find here lt p gt lt form action search html gt lt input type text autocomplete off name search class search box placeholder search image gt lt button class search btn type submit gt search lt button gt lt form gt lt div gt lt header gt Without CSS HTML is nothing is t it So let s style our header element margin padding box sizing border box font family roboto sans serif header section width height vh position relative background image url img bg png background size cover display flex justify content center align items center text align center logo font size px font weight color fff text transform capitalize sub line color fff padding px px font size px text transform capitalize word spacing px position relative font weight sub line after content position absolute bottom left transform translateX width height px background fff sub line before content position absolute bottom px left transform translateX width px height px background fff border radius search box display block margin px auto px width height px border radius px padding px border none outline none text transform capitalize search btn padding px px border radius px text transform capitalize border none outline none cursor pointer background a color fff Those are lots of styling After giving these CSS we are done with our header section OutputIsn t it looking great Gallery SectionAfter header section we have image recommendations or image gallery in our home page in mansory layout To create mansory layout first we need some elements or images After header section in index html lt section class gallery gt lt img src img img png class gallery img alt gt lt img src img img png class gallery img alt gt lt img src img img png class gallery img alt gt lt img src img img png class gallery img alt gt lt img src img img png class gallery img alt gt lt img src img img png class gallery img alt gt lt img src img img png class gallery img alt gt lt img src img img png class gallery img alt gt lt section gt For now create image elements And give them some styles gallery gallery width padding px background fff columns column gap px gallery img width height object fit cover margin bottom px border radius px cursor pointer background fff OutputIf you create less than images you ll probably don t see images in columns This is because we have used columns CSS property to create grid Note we are not using grid here cause grid create a fixed size row and columns and we want images to have their proportions Columns property is used to define columns for elements in CSS without using grid This don t restrict you with fixed row height So now you can remove the hard coded image elements from index html and let s make it with JS So open app js In app js file first you need to store your unsplash API key If you don t know how to create one then check this const access key your api key Once you got your key we need random photo url so that we can get random photos you can find the url in the unsplash documentation but for your ease here it is const random photo url access key amp count Here access key is your api key And I am using JS template literals here Now make a function getImages This function will make request to random photo URL let allImages this will store all the imagesconst getImages gt fetch random photo url then res gt res json then data gt allImages data makeImages allImages allImages will store the fetched data so we can access the data after receiving it outside the function So now once we got the images we need to make dynamic image elements for that make makeImages function const gallery document querySelector gallery const makeImages data gt data forEach item index gt let img document createElement img img src item urls regular img className gallery img gallery appendChild img So after this you should see random images being fetched from API and created with JS dynamically getImages Make sure to call the function OutputGreat now let s create image popup effect For that again open your index html file Image popupCreate image popup before gallery Or you can it after also it doesn t really matters lt popup window gt lt div class image popup gt lt button class close btn gt lt button gt lt a href class download btn gt download image lt a gt lt img src img img png class large img alt gt lt button class controls pre btn gt lt img src img pre png alt gt lt button gt lt button class controls nxt btn gt lt img src img nxt png alt gt lt button gt lt div gt image popup image popup position fixed top left transform translate width height vh background fff box shadow px px px rgba border radius px transition s display flex justify content center align items center image popup hide display none opacity close btn position absolute top px left px width px height px background ffff border radius border none cursor pointer download btn text transform capitalize padding px px background fe color fff text decoration none border radius px position absolute right px top px large img height width auto max width object fit cover border radius px controls background none border none position absolute top transform translateY cursor pointer pre btn left px nxt btn right px OutputYou can see in above styles we have hide class which is setting display to none So add hide class to image popup element You can also remove the image source from large imgNow let s make it functional with Javascript let currentImage will track the current large imageconst makeImages data gt data forEach item index gt previous code popup image img addEventListener click gt currentImage index showPopup item This above code will add click event to all the images so that we can open the popup So now let s create showPopup function const showPopup item gt let popup document querySelector image popup const downloadBtn document querySelector download btn const closeBtn document querySelector close btn const image document querySelector large img popup classList remove hide downloadBtn href item links html image src item urls regular closeBtn addEventListener click gt popup classList add hide In this function first we are selecting all the HTML elements using querySelector method And then removing hide class from popup element also setting up download image btn link along with image source And yes we are also add close functionality So we just have to make controls now controlsconst preBtns document querySelector pre btn const nxtBtns document querySelector nxt btn preBtns addEventListener click gt if currentImage gt currentImage showPopup allImages currentImage nxtBtns addEventListener click gt if currentImage lt allImages length currentImage showPopup allImages currentImage Above code is also very simple In above code we are selecting the previous and next buttons and adding click event to them Inside the events I am checking for condition to validate end image So great We are done with our home page Let s create our search page now Search PageOur search page is very simple To start copy all the elements from index html except header section and paste it inside this file After done with that make a search box at the very start of body tag lt form action search html class search container gt lt input type text autocomplete off name search class search input placeholder search image gt lt button class search type submit gt search lt button gt lt form gt Make sure you link search css amp app js file to it Now add these form styles to search css search container width height px background a padding px px display flex justify content space between search input width height px border radius px border none outline none padding px text transform capitalize search background none border none color fff text transform capitalize cursor pointer After all of this you should see something like this OutputNow let s fetch images related to search keyword Inside app jslet searchParam location search split pop this will give extract the search keyword from URLconst search photo url access key amp query searchParam amp per page this is search image URLNow create a function to make request to the URL const searchImages gt fetch search photo url then res gt res json then data gt allImages data results makeImages allImages After this we just need to check we are on home page or search page and call the function according to it So instead of calling simple getImages wrap that to this condition along with this code if searchParam getImages else searchImages So above condition is simple when we open home page our searchParam will be an empty string That s why I am comparing that to check for the page OutputI searched for carsSo that s it Great work guys We are done with the project So how is this project and did you learn something new from this I hope you understood each and everything If you have doubt or I missed something let me know in the comments Articles you may find UsefulBest CSS EffectInfinte CSS loaderDisney CloneYoutube API Youtube CloneTMDB Netflix CloneI really appreciate if you can subscribe my youtube channel I create awesome web contents Source CodeThanks for reading 2021-12-09 15:10:45
Apple AppleInsider - Frontpage News Best apps for managing To Do lists on your iPhone and iPad https://appleinsider.com/articles/21/12/09/best-apps-for-managing-to-do-lists-on-your-iphone-and-ipad?utm_medium=rss Best apps for managing To Do lists on your iPhone and iPadThe iPhone is the single best place for a To Do list because you are nearly always close to it Here are the best task management apps for it or your iPad Just as with calendars and email and weather apps you already have a To Do app on your iPhone Apple s own Reminders app is typical of the company in that it s quite clearly simple to use quite obviously free but it also hides how powerful it can be Reminders is really a kind of mid level To Do app There are ones that are much more basic there are others that are mid range And then there are just a couple that are so powerful that they can handle anything you need to throw at them anything you need to stay on top of Read more 2021-12-09 15:32:30
Apple AppleInsider - Frontpage News Apple could hit $3T market cap in 2022 on iPhone, AR glasses, analyst says https://appleinsider.com/articles/21/12/09/apple-could-hit-3t-market-cap-in-2022-on-iphone-ar-glasses-analyst-says?utm_medium=rss Apple could hit T market cap in on iPhone AR glasses analyst saysApple s iPhone growth story is looking robust heading into despite supply chain issues while new product categories like Apple Glass could help Apple break into the metaverse according to Wedbush The iPhone and iPhone Pro In a note to investors seen by AppleInsider Wedbush lead analyst Daniel Ives writes that a number of factors ーincluding supply data and Apple Store checks ーare backing up his view that iPhone demand is currently outstripping supply by about million units Read more 2021-12-09 15:09:20
Apple AppleInsider - Frontpage News Best deals Dec. 9: discounted AirPods, $100 off Samsung 4K TV, $85 1TB external SSD, more! https://appleinsider.com/articles/21/12/09/best-deals-dec-9-discounted-airpods-100-off-samsung-4k-tv-85-1tb-external-ssd-more?utm_medium=rss Best deals Dec discounted AirPods off Samsung K TV TB external SSD more Thursday s best deals include off Nintendo Switch games like Mario and Zelda off Eero Mesh WiFi and off a Shark Robot Vacuum Best deals for ThursdayThe internet has a plethora of deals each day but many deals aren t worth pursuing In an effort to help you sift through the chaos we ve hand curated some of the best deals we could find on Apple products tech accessories and other items for the AppleInsider audience Read more 2021-12-09 15:08:27
Apple AppleInsider - Frontpage News The best apps for your calendar & schedule on the iPhone and iPad https://appleinsider.com/articles/21/12/09/the-best-apps-for-your-calendar-schedule-on-the-iphone-and-ipad?utm_medium=rss The best apps for your calendar amp schedule on the iPhone and iPadYou ve already got Apple s own Calendar app but if that were perfect there wouldn t be these superb alternatives Here s how to handle your events and appointments quickly efficiently ーand accurately Let s not knock Apple Calendar It s capable powerful reliable ーand it s also the engine behind each one of the alternatives that are worth looking at Each of these and practically all other iOS calendar apps you can find use the same data as Apple s Calendar Trust us we ve tested half a dozen at the same time and it is great how putting an event into one calendar app means it is instantly available to all of them Read more 2021-12-09 15:34:11
Apple AppleInsider - Frontpage News Apple's 2022 iPhone 14 Pro predicted to have hole-punch display https://appleinsider.com/articles/21/12/09/apples-2022-iphone-14-pro-predicted-to-have-hole-punch-display?utm_medium=rss Apple x s iPhone Pro predicted to have hole punch displayA new report claims that Apple will be replacing the iPhone notch with a hole punch design in but solely for the Pro models The move to a hole punch display instead of the current notch has previously been predicted by Ming Chi Kuo More recently claimed renders of the iPhone range leaked just ahead of the iPhone launch Now according to The Elec unspecified sources say that the equivalents of the iPhone Pro and iPhone Pro Max will gain the hole punch design And the next equivalent of the iPhone in the range will retain the current notch Read more 2021-12-09 15:52:55
Apple AppleInsider - Frontpage News Three new Apple Watch models coming in 2022, says Ming-Chi Kuo https://appleinsider.com/articles/21/12/08/three-new-apple-watch-models-coming-in-2022-says-ming-chi-kuo?utm_medium=rss Three new Apple Watch models coming in says Ming Chi KuoAnalyst Ming Chi Kuo reports that alongside the annual Apple Watch Series increment in the fall Apple will also release a revised Apple Watch SE and a special ruggedized sports edition As well as reporting on expectations for the Apple AR headset analyst Ming Chi Kuo has continued his reports about forthcoming Apple Watch releases Previously he s suggested that the Apple Watch Series may include temperature measurement but now he s doubling down on his expectation that Apple will expand the Watch range The new Apple Watch range in H includes Apple Watch the new Apple Watch SE and the extreme sports version says Kuo in his latest report Read more 2021-12-09 15:35:25
海外科学 NYT > Science Dozens of Earthquakes Strike Off Oregon Coast, but Experts Say Not to Worry https://www.nytimes.com/2021/12/09/science/oregon-earthquakes.html Dozens of Earthquakes Strike Off Oregon Coast but Experts Say Not to WorryAt least earthquakes rattled the Blanco Fracture Zone from Tuesday into Wednesday according to the U S Geological Survey 2021-12-09 15:08:06
海外科学 BBC News - Science & Environment Dragonflies disappearing as wetlands are lost https://www.bbc.co.uk/news/science-environment-59585677?at_medium=RSS&at_campaign=KARANGA conservation 2021-12-09 15:51:38
金融 RSS FILE - 日本証券業協会 株券等貸借取引状況(週間) https://www.jsda.or.jp/shiryoshitsu/toukei/kabu-taiw/index.html 貸借 2021-12-09 15:30:00
金融 金融庁ホームページ 日本証券業協会(JSDA)及び国際資本市場協会(ICMA)共催 第5回グリーン/ソーシャルボンド・カンファレンスにおける中島長官の講演について掲載しました。 https://www.fsa.go.jp/common/conference/danwa/index_kouen.html#Commissioner 日本証券業協会 2021-12-09 17:00:00
金融 金融庁ホームページ 令和3年11月に開催された業界団体との意見交換会において金融庁が提起した主な論点を公表しました。 https://www.fsa.go.jp/common/ronten/index_5.html 意見交換会 2021-12-09 17:00:00
金融 金融庁ホームページ 審判期日の予定を更新しました。 https://www.fsa.go.jp/policy/kachoukin/06.html 期日 2021-12-09 16:00:00
金融 金融庁ホームページ モルフォ役員による内部者取引に対する課徴金納付命令決定の取消しについて公表しました。 https://www.fsa.go.jp/news/r3/shouken/20211209.html 内部者取引 2021-12-09 16:00:00
ニュース ジェトロ ビジネスニュース(通商弘報) 湖北省政府、香港政府と13分野の覚書締結、協力関係を強化へ https://www.jetro.go.jp/biznews/2021/12/10b89c6982f7d0c0.html 協力関係 2021-12-09 15:10:00
ニュース BBC News - Home Christmas parties row: Three gatherings to be investigated by top civil servant https://www.bbc.co.uk/news/uk-politics-59591610?at_medium=RSS&at_campaign=KARANGA gatherings 2021-12-09 15:45:32
ニュース BBC News - Home Boris Johnson flat row: What do we know about the PM’s finances? https://www.bbc.co.uk/news/uk-politics-56928610?at_medium=RSS&at_campaign=KARANGA boris 2021-12-09 15:08:59
ニュース BBC News - Home Dunne banned for 18 months after being found guilty of bullying fellow jockey Frost https://www.bbc.co.uk/sport/horse-racing/59591300?at_medium=RSS&at_campaign=KARANGA Dunne banned for months after being found guilty of bullying fellow jockey FrostRobbie Dunne is banned for months with three months suspended after being found guilty of bullying and harassing fellow jockey Bryony Frost 2021-12-09 15:40:16
北海道 北海道新聞 ギグワーカー保護へ法案 EU、従業員と同等に https://www.hokkaido-np.co.jp/article/621215/ 欧州委員会 2021-12-10 00:12:00
北海道 北海道新聞 ひき逃げ疑い81歳男逮捕 小学生の列に衝突、静岡 https://www.hokkaido-np.co.jp/article/621213/ 軽乗用車 2021-12-10 00:05:00

コメント

このブログの人気の投稿

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

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

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