投稿時間:2021-06-09 00:38:10 RSSフィード2021-06-09 00:00 分まとめ(53件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 楽天モバイルのiOS版「Rakuten Link」アプリの仕様変更は6月24日以降に https://taisy0.com/2021/06/08/141569.html rakuten 2021-06-08 14:30:49
IT 気になる、記になる… Adobe、Apple シリコンにネイティブ対応した「Premiere Pro」の正式版を近日公開予定 − 最新ベンチマーク結果も公開 https://taisy0.com/2021/06/08/141565.html pfeifferrep 2021-06-08 14:13:34
TECH Engadget Japanese Apple Music、空間オーディオに続きロスレス配信も開始。厳選したプレイリストも用意 https://japanese.engadget.com/apple-music-spatial-lossless-audio-140031194.html applemusic 2021-06-08 14:00:31
python Pythonタグが付けられた新着投稿 - Qiita 残プロ 第-7回 ~pythonで文字列操作~ https://qiita.com/R1nY1x1/items/1dfd5d3c44e7603aad0d 2021-06-08 23:51:55
python Pythonタグが付けられた新着投稿 - Qiita notion apiとpythonで本管理の備忘録 https://qiita.com/dairin007/items/6486d2942f067a4c4a6b 2021-06-08 23:48:19
python Pythonタグが付けられた新着投稿 - Qiita yahoo路線乗り換え案内の情報を抽出したい https://qiita.com/hirohiroto522/items/2fc33cbc36ea8600f867 2021-06-08 23:30:06
js JavaScriptタグが付けられた新着投稿 - Qiita JavaScriptで物理エンジンを構築1 https://qiita.com/horitaku1124/items/f45379a8f3fd011c431d constanimationFramegtフレーム毎の物理計算requestrequestAnimationFrameanimationFramerequestAnimationFrameanimationFrame重力加速度gravityが重力加速度です。 2021-06-08 23:17:10
js JavaScriptタグが付けられた新着投稿 - Qiita javascriptでシンプルなtableの動的行追加・削除(ボタンクリックで行追加・削除) https://qiita.com/forever---beginner/items/7901217dc811d72687f8 javascriptでシンプルなtableの動的行追加・削除ボタンクリックで行追加・削除やりたいことtableを、ボタンクリックで行追加、削除する完成形、動作SeethePentableclickaddclickdelbyHirofumiSatohfmstonCodePenざっくり解説行追加tableとthだけ用意createElementで、追加するtr行要素を作っておく繰り返しで「td作る→tdに何か入れる→trにどんどん追加で作ったtrをtdに入れる削除最新のtableの最終行取得deleteRowで削除コードindexhtmlltボタン配置gtltdivgtltbuttononclickaddgt行追加ltbuttongtltbuttononclickdelgt行削除ltbuttongtltdivgtlttable作成とヘッダーだけ先にgtlttableidtblborderstylebordercollapsecollapsegtlttrgtltthgt名前ltthgtltthgt趣味ltthgtltthgt好きなものltthgtlttrgtlttablegtjshtml繰り返し使うtableだけ先に定数に格納consttbldocumentgetElementByIdtbl行追加functionadd空の行要素を先に作成trlettrdocumentcreateElementtr以下、繰り返し処理新しいtd要素を作って変数tdに格納tdに何か追加。 2021-06-08 23:33:17
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) githubで画像が表示されない。 https://teratail.com/questions/342970?rss=all 表示されないのは、「web制作アイコン」いがいの画像になります。 2021-06-08 23:58:16
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ReactとRailsでいいね数を表示したい https://teratail.com/questions/342969?rss=all ReactとRailsでいいね数を表示したいいいねクリック後にいいね数をブラウザ上に表示させたい現在RailsとReactを用いていいね機能の実装はできましたが、いいねクリック後に投稿されたものにいいね数を表示させたいのですが実装方法がわからず、皆様のアドバイスを頂きたくご相談させて頂きました。 2021-06-08 23:46:26
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【openpyxl】複数セルに特定文字を記入する方法。 https://teratail.com/questions/342968?rss=all 【openpyxl】複数セルに特定文字を記入する方法。 2021-06-08 23:16:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Python pandas dataframe 内で、string を一括して split する方法 https://teratail.com/questions/342967?rss=all 2021-06-08 23:16:00
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ABC072 C - Together Python での解答 https://teratail.com/questions/342966?rss=all 2021-06-08 23:09:50
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Unityでマイク入力をリアルタイムで取得し続けたい https://teratail.com/questions/342965?rss=all Unityでマイク入力をリアルタイムで取得し続けたいUnityでマイク入力を入力した瞬間から即取得して、その音声のピッチによってキャラクターを動かしたりしたいです。 2021-06-08 23:05:55
Ruby Rubyタグが付けられた新着投稿 - Qiita いいねボタンの応答速度を速く見せる方法 https://qiita.com/UTOG/items/cf1bd6a06d25c69b908a なのでボタンを押した瞬間に色を変えて、裏でlikeデータを作成するようにします。 2021-06-08 23:20:16
AWS AWSタグが付けられた新着投稿 - Qiita KCLについてまとめる https://qiita.com/masawai/items/c6d8c5bea3f25be5648e ストリームに接続ストリーム内のシャードを列挙リースを使用して、シャードとそのワーカーとの関連付けを調整レコードプロセッサで管理する各シャードのレコードプロセッサをインスタンス化データストリームからデータレコードを取得対応するレコードプロセッサにレコードを送信処理されたレコードのチェックポイントを作成ワーカーインスタンス数が変更された場合、またはリシャードが発生した場合、シャードワーカー関連リースの調停を実施KCLはJavaで動いている→アプリプログラムをPythonで書く場合、KCLforPythonをインストールし、MultiLangDaemonを利用する。 2021-06-08 23:45:29
AWS AWSタグが付けられた新着投稿 - Qiita AWS CloudFrontのアクセスを一律リダイレクトするように設定できるまでの話 https://qiita.com/ktroutner/items/5c0672eb88b162ab99ef やったことその③CloudFrontのOriginを変更する上記のリダイレクト設定は正しいが、そもそもリダイレクトを使うためにCloudFrontが使っているSBucketのURLを変更する必要があるのが分かった。 2021-06-08 23:28:49
AWS AWSタグが付けられた新着投稿 - Qiita AWS Systems Manager Session Managerが繋がらないときのチェックリスト【プライベートサブネット・NATなし】 https://qiita.com/kazu_kazu/items/996f31d4cbc9d6721c6e AWSSystemsManagerSessionManagerが繋がらないときのチェックリスト【プライベートサブネット・NATなし】はじめにSessionManagerを使用した接続で詰まったので、自分用に作成しました。 2021-06-08 23:28:15
Docker dockerタグが付けられた新着投稿 - Qiita SharePoint Framework 1.12.1 を Docker を使って開発したい https://qiita.com/nanoka/items/2e9f49750e973782b6fe めんどくさそうなので、一度諦めましたが、やっぱり気になったのでとりあえず動くところまでやってみました。 2021-06-08 23:57:39
Docker dockerタグが付けられた新着投稿 - Qiita 【shellscript】コマンドライン引数取り扱いメモ https://qiita.com/hgaiji/items/3f032718a00b50e4ecb2 2021-06-08 23:48:15
Ruby Railsタグが付けられた新着投稿 - Qiita Rails API + Vue.js のSPAにCarrierWaveを導入する https://qiita.com/Panderwall/items/c973a3ab20feab41694d RailsAPIVuejsのSPAにCarrierWaveを導入するはじめにCarrierWaveの導入はRailsアプリケーションでは簡単にできるのですが、SPAでは少し苦労したのでまとめておきます。 2021-06-08 23:54:59
Ruby Railsタグが付けられた新着投稿 - Qiita ActionMailboxでRSpecのテストを書く https://qiita.com/tanutanu/items/341df24fd7ff691b9d93 RSpecのGithubのReadmeによるとRails系にはRSpec系が必要なようなので、RSpecをアップデート合わせます。 2021-06-08 23:40:47
Ruby Railsタグが付けられた新着投稿 - Qiita いいねボタンの応答速度を速く見せる方法 https://qiita.com/UTOG/items/cf1bd6a06d25c69b908a なのでボタンを押した瞬間に色を変えて、裏でlikeデータを作成するようにします。 2021-06-08 23:20:16
技術ブログ Developers.IO Cloud DLP で半角カタカナや難読苗字は検出できる? 〜カスタム辞書の登録方法を添えて〜 https://dev.classmethod.jp/articles/cloud-dlp-detect-japanese-with-custom-dictionary/ clouddlp 2021-06-08 14:15:06
海外TECH DEV Community Decorators and Mixins in Lightning Web Components https://dev.to/mbogan/decorators-and-mixins-in-lightning-web-components-5d83 Decorators and Mixins in Lightning Web Components Decorators and Mixins in Lightning Web ComponentsIt s safe to say that every modern web application these days relies to some degree on three foundational web standards HTML CSS and JavaScript While HTML has largely stabilized since the HTML standard both CSS and JavaScript continue to evolve to meet developers and users needs The evolving nature of these three technologies has lead to the introduction of web components a cross browser solution for building complex web apps On top of this open source standard Salesforce developed Lightning Web Components LWC as a fast enterprise grade wrapper around vanilla web components The result is a thin performant and feature packed framework built entirely on the open web LWC is not only built on top of the ECMAScript standard it also provides some nifty syntactic sugar that can transpile into standard JavaScript Because of this the LWC framework is able to incorporate proposed language features which simplifies app development by future proofing your code in the always evolving JavaScript ecosystem In this post we ll take a closer look at two relatively recent featuresーmixins and decoratorsーand see how they can be used in your LWC apps What is a Mixin In many object oriented programming languages classes can receive additional methods through a feature called inheritance For example if you have a Vehicle class with the methods go and stop subclasses like Bicycle and Car can implement them directly class Vehicle void go void stop class Bicycle amp lt Vehicle void go usePedal void stop stopPedal class Car amp lt Vehicle void go useEngine void stop stopEngine Inheritance affects the composition of an object by changing its hierarchy Every Bicycle and Car is now also a Vehicle But what if you merely wanted to add in common methods to objects without dealing with any parent class That s what a mixin does In a JavaScript context mixins can add behaviors to JavaScript classes which is useful because classes can only extend from one other class while multiple mixins can be added to a class Mixins take advantage of the Object assign method which copies all of the properties from one object onto another mixinlet greetingsMixin sayHi alert Hello this name sayBye alert Bye this name class User constructor name this name name copy the methodsObject assign User prototype greetingsMixin User can now call sayHi and sayBye natively Per JavaScript rules User can also inherit from just one class while including properties and function from any number of mixins class User extends Person Object assign User prototype greetingsMixin Object assign User prototype someOtherMixin However writing out Object assign is somewhat akin to littering your code What s worse is figuring out what the method is doing isn t very intuitive Through some native JavaScript syntax you can actually create a subclass factory with mixins and declare which mixins you re using right at the top class User extends greetingsMixin Person For more information on this technique check out this article Now User includes the greetingsMixin and inherits from the Person class all in one line This technique is more than syntactical sugar it s actually the one which LWC regularly prefers For example the Navigation Mixin provides methods that are useful to navigational UI elements but ultimately each class that includes it should also derive from a plain LightningElement import LightningElement from lwc import NavigationMixin from lightning navigation export default class TestComponent extends NavigationMixin LightningElement NavigationMixin provides functionality that s crucial to components dealing with navigating through pages while LightningElement provides all the base functionality for every component Thus TestComponent will need to include NavigationMixin and subclass from LightningElement and can do so in the easy to see single line format What is a Decorator Decorators are currently a proposal to add to JavaScript but they re so incredibly useful that many frameworks already support them In essence a decorator is a function that can modify a class or any of its properties and methods That s a pretty high level definition so let s take a look at what that means in practice Suppose we have a class like this class User constructor firstName lastName this firstName firstName this lastName lastName getFullName return this firstName this lastName Now any code which makes use of this class can create a user let user new User Jane Eyre user getFullName returns Jane Eyre But because of the way JavaScript is designed a developer could inadvertently change the getFullName method if they so desired let user new User Jane Eyre user prototype getFullName function return not the name user getFullName returns not the name Now this is obviously a trite example but the danger still remains You can write code to make a class property read only like this Object defineProperty User prototype gettFullName writable false This works but it s obviously cumbersome to write for multiple properties Enter decorators You can define a decorator function to apply any behavior you want to a target property For example to set a target as writable false you could do this function readonly target target descriptor writable false return target We just defined a decorator called readonly which when passed a target sets its descriptor writable property to false This can be applied to our User class like this class User readonly getFullName return this firstName this lastName Voila The same functionality in a single line of code LWC provides several decorators for developers to use They are api by default every property is hidden and private api exposes it publicly track this marks a property as reactive which means that when its value changes the web component will re render and display the new value wire this is a decorator which signifies that we want to read Salesforce data These three decorators which are unique to LWC aim to help reduce rewriting the same code while easily providing common functionality ConclusionSince LWC is built on web standards it can leverage native APIs and languages in order to make developers immediately productive since they re using existing skills rather than learning proprietary techniques If you d like to take a closer look at Lightning Web Components Salesforce has a boilerplate app that s built in TypeScript There s also a Trailhead lesson to help you learn about web components in less than an hour Or feel free to check out the LWC dev docs for more specific reference information 2021-06-08 14:49:58
海外TECH DEV Community What is gun.js? https://dev.to/caiobraga/what-is-gun-js-2f0d What is gun js Lately a technology that has been calling my attention is Gun js besides being easy to use it also has a very interesting concept about how we should see data usage and rights over it Today I m going to talk a little more about what gun js is as well as discuss Decentralized web concepts Gun is based on Decentralized web or Dweb and aims to make the internet freer and less greedyThe way the internet works today is dependent on large corporations which store their data on their own servers However this has caused some discomfort for millions of people around the world with the suspicion that these large corporations are using data and personal information for marketing and choosing what people see on the internet What is DwebDweb stands for decentralized internet and it s the concept Gun js is based on The idea behind Dweb and hence behind Gun js is that the internet is formed by a concept of community Soon the information would be stored through the devices of all users of the system Each one storing a bit of information along with the free servers provided by Gun js itselfThis makes the internet not only freer but also cheaper for programmers and consequently for end users Since large companies today are responsible for taking a large part of the money that goes into the system and also able to freely access a large part of the data without having to know for sure whether we are providing data to be spied on or not Gun jsGUN is an ecosystem of tools that allows you to create encrypted applications that run thanks to a community With it were created versions of youtube and other social networksThe database is formed by the user s information stored on his own machine on other users machines and on larger servers in the system which allows the information to remain reliable and prevents loss of information if a user s device is lost Besides it s an amazing concept to think you re part of a giant database 2021-06-08 14:49:03
海外TECH DEV Community Load-Balancing Minecraft Servers with Kong Gateway https://dev.to/mbogan/load-balancing-minecraft-servers-with-kong-gateway-59ml Load Balancing Minecraft Servers with Kong GatewayIt s time to have some fun Sure tell your colleagues or your family that you re doing research experimenting with some new techーbecause that is what we ll be doingーbut just don t let them see you playing Minecraft Here s the scenario You re organizing a full day Minecraft class for local STEM students You need to run your own Minecraft servers to ensure a kid friendly multiplayer environment restricted only to your students One server won t be enough so you ll run two servers simultaneously expecting your load balancer to handle sending students to Server A or Server B depending on the load In this article we re going to explore port forwarding and load balancing with Kong Gateway We re going to do this by spinning up multiple Minecraft servers and then placing Kong Gateway in front of these upstream services to handle port forwarding and load balancing Before we dive in let s briefly cover a few important technology concepts Key Concepts Port ForwardingPort forwarding is receiving network requests on a certain port of a machine and forwarding those requests to a different port A router firewall or API gateway usually handles this task For example you might have a web server listening on port and a database server listening on port Your API gateway would listen for requests from outside your network Requests addressed to port would be forwarded by the gateway to your web server at port Meanwhile requests addressed to port would be forwarded to your database server at port Load BalancingLoad balancing is the task of distributing multiple requests to a server in a balanced manner across numerous replicas of that server A specific piece of hardware or software called a load balancer usually handles this The outside world is unaware that there are multiple replicas of a server running They believe they re making requests to a single server The load balancer however distributes the request load to prevent any one server from being overwhelmed In the case of a replica failing completely the load balancer ensures that requests only go to healthy nodes Kong GatewayKong Gateway is a thin API gateway layer that sits in front of upstream services capable of performing these port forwarding and load balancing tasks Whether those upstream services are web servers or databases or even Minecraft game servers Kong is the front door greeter to all requests In addition to traffic control Kong Gateway can manage authentication request transformations analytics and logging TCP Stream SupportOne aspect of our Minecraft project that sets it apart from deploying a typical web server or database is that Minecraft requires an established connection between the Minecraft client the gamer and server Rather than expecting stateless HTTP requests we ll need to handle TCP connections with streaming data Fortunately Kong Gateway fully supports TCP streaming Our project approachWe re going to walk through this project step by step Spin up a single local Minecraft server without any port forwarding Spin up a Minecraft server on a non default port configuring Kong Gateway to port forward requests to that server Spin up two Minecraft servers on different ports configuring Kong Gateway to load balance and port forward connection requests As you can see we ll start simple and we ll slowly build on complexity What you ll need to get startedYou don t actually need a lot of familiarity with Minecraft to progress through this mini project Since it s easiest to spin up Minecraft servers within Docker containers basic familiarity with Docker may be helpful You will need to install Docker Engine on your local machine Lastly if you want to test that our project results are successful you ll need to install the Minecraft game client and log in as a paid owner of the game The free trial of Minecraft doesn t allow connecting to multiplayer servers which is what we ll be running for our project Are you ready to do this Here we go Step Single Minecraft Server with Default PortIn this first step we want to spin up a single Minecraft server on our local machine We ll use the default port for the server and then we ll connect our game client to the server It s simple to deploy the Minecraft server as a Docker container with the Docker image found here In a terminal window we ll run this command to pull down the server image and spin it up in a container  docker run p e EULA true itzg minecraft serverUnable to find image itzg minecraft server latest locallylatest Pulling from itzg minecraft server Status Downloaded newer image for itzg minecraft server latest init Checking for JSON files init Setting initial memory to G and max to G init Starting the Minecraft server Server thread INFO Preparing start region for dimension minecraft overworld Worker Main INFO Preparing spawn area As our container starts up it downloads the Docker image for the Minecraft server Once the image downloads it starts up the server and we see the log messages of the server startup Here s an explanation of flags and options we provided to docker run in our command p specifies a port on the host your local machine that Docker should bind to a port on the container In this case our local machine s port will point to the container s port By default Minecraft servers run on port Typically you will always bind to the container s port regardless of the port on the host that you choose to use e EULA true provides an environment variable that the Docker container needs to use when starting up the server within the container The Minecraft server application requires that you accept the EULA upon startup Providing this environment variable is the Docker way to do that Lastly we specify the name of the Docker image on DockerHub which contains the Minecraft server With our server running let s see if we can connect to the server at localhost Open up the Minecraft Launcher client and click on Play The actual Minecraft game should launch For game options click on Multiplayer Next click on Direct Connection For server address enter localhost Our local port of course is bound to the container running our Minecraft server Finally we click on Join Server And…we re in If you look back at the terminal with the docker run command you ll recall that it continues to output the log messages from the Minecraft server It might look something like this   User Authenticator INFO UUID of player familycodingfun is bfbb c a bf feafca Server thread INFO familycodingfun logged in with entity id at Server thread INFO familycodingfun joined the gameThe server notes that a new player my username is familycodingfun has joined the game Our single game server setup is complete Now let s add Kong Gateway and port forwarding to the mix For now we ll exit the game and then kill our Docker container with the server Step Minecraft Server with Kong Gateway and Port ForwardingNext we ll put Kong Gateway in front of our Minecraft server and take advantage of port forwarding If you were running a private network you might forbid requests from outside the network to reach your Minecraft server port At the same time you might expose a single port on which Kong listens Kong as the API gateway would listen to requests on that port and then forward those requests to your Minecraft server Doing so ensures that any requests that want to go to a Minecraft server must go through Kong first Although we ll be working within localhost we ll set up this kind of port forwarding through Kong Just like in our previous step we want our Minecraft server to run on port Meanwhile Kong will listen on port Kong will take TCP connection requests on port and forward them to the Minecraft server at port Install and Setup KongThe first step is to install Kong Gateway The installation steps vary depending on your unique setup After installing Kong we ll need to set up the initial configuration file In your etc kong folder you ll see a template file called kong conf default We will copy this file and rename it as kong conf which is the file that Kong will look to for its startup configuration  cd etc kong etc kong  sudo cp kong conf default kong conf etc kong  tree ├ーkong conf├ーkong conf default└ーkong logrotate directories filesIn kong conf we ll need to make the following three edits PATH etc kong kong conf Around line Uncomment and set for TCP listening on port stream listen   Around line Uncomment and set database to off  database off Around line Uncomment and set to a file we re about to create          Use the absolute path to a project folder declarative config PATH TO MY project minecraft kong ymlThe stream listen configuration tells Kong to listen for streaming TCP traffic We re telling Kong to listen on port for this For the needs of this mini project we can configure Kong using its DB less and Declarative configuration style Kong will not need to use a database database off and all of our configurations for port forwarding and load balancing will be stored in a single YAML file That is the declarative config file path that we ve set above Write Declarative Configuration FileBefore we start up Kong we need to write that minecraft kong yml file with our port forwarding configuration In a project folder that matches the path you specified above open up a new file called minecraft kong yml PATH project minecraft kong yml format version services   name Minecraft Server A  url tcp localhost   routes     name Server A TCP Routes    protocols tcp tls     destinations       ip       port In this file we declare a new Service entity named Minecraft Server A The server uses the TCP protocol listening on localhost port so we set these values together as the service s url Next we define a Route for the service which associates our service with a URL path or an incoming connection destination that Kong will listen for We provide a name for our route telling Kong to listen for requests using TCP TLS on the destination that we specified in our kong conf file ip and port Start Up Minecraft Server and KongWe ve written all of our configuration for this step Let s start up our Minecraft server in Docker Remember we want our host our local machine to be ready on port binding that port to the standard Minecraft server port of on the container project docker run p e EULA true itzg minecraft serverThat command might take a little time to run as the server starts up Now in a separate terminal window we ll start up Kong project sudo kong startWith our server up and running we go back to our game client and just like above choose Multiplayer and try to establish a Direct Connection with a game server We know that we could connect directly to localhost since that s the actual host port bound to the container s port rather we want to test Kong s port forwarding We want to connect to the supposed game server on localhost pretending that we re the casual user who is unaware that port points to a port forwarding gateway Click on Join Server Like Step your connection should be successful and you ll have entered the Minecraft world Our TCP connection request to localhost went to Kong Gateway which then forwarded that request to port our actual Minecraft server We have port forwarding up and running Step Load Balancing Two Minecraft ServersWe will spin up two Minecraft servers for the final step in our mini project listening on ports and Previously when we only had one Minecraft server Kong would naturally forward TCP requests at port to that sole Minecraft server s port Now with two Minecraft server ports to choose from we ll need to use port forwarding and load balancing Kong Gateway will take TCP connection requests that come to port and distribute connections evenly between Minecraft Server A and Minecraft Server B Start Up Minecraft ServersIf you haven t done so already terminate the single Minecraft server that was running in the previous step We ll start everything up again from a clean state spinning up each server in its own terminal window In your first terminal window run the Docker container for Server A binding the host s port to the container s port project docker run p e EULA true itzg minecraft serverThen in a separate terminal window we will start up Server B this time binding the host s port to the container s port project docker run p e EULA true itzg minecraft serverNow we have Servers A and B running accessible at ports and respectively Edit Declarative Configuration FileNext we want to edit our declarative configuration file minecraft kong yml configuring Kong for load balancing Edit your file to reflect the following PATH project minecraft kong yml format version upstreams   name Minecraft Servers  targets     target localhost     weight     target localhost     weight services   name Load Balancing Service  host Minecraft Servers  protocol tcp  routes     name Load Balancing Route    protocols tcp tls     destinations       ip       port Let s walk through what we ve done here First we added an Upstream Object arbitrarily named Minecraft Servers which functions as a virtual host for load balancing to multiple services That s exactly the functionality that we need We added two Target Objects to our upstream service Each target has an address with host and port in our case our two targets point to localhost Minecraft Server A and localhost Minecraft Server B Then we set a weight for each target which the load balancer uses to distribute load Even though we ve explicitly set the weights evenly to the default for this optional configuration is Next we declared our Service Object which in this case is our load balancer service Requests that satisfy the routes we establish will be forwarded to the Minecraft Servers host our load balancing upstream object Similar to our previous step we configured a route telling Kong Gateway to listen for TCP TLS requests destined for Restart KongSince our Kong configuration has changed we need to restart Kong for the changes to take effect project sudo kong restartAt this point everything is up and running We have our two Minecraft servers Server A and Server B running in Docker containers in two separate terminal windows We have Kong configured to listen for TCP on port forwarding those requests to our load balancer distributing connections across our two servers Open the Minecraft game client again Similar to previous steps we will attempt to connect to the multiplayer server at localhost directly As you connect keep an eye on your two server terminal windows As you repeatedly connect to the game disconnect and then reconnect you will at times see a connection log message for Server A and then at other times a message for Server B And just like that we have set up our load balancer to distribute connection requests across our two Minecraft servers Ready to Play WorkTo recap we slowly progressed in complexity for our mini project We started by simply spinning up a single Minecraft server in a Docker container using port for accepting game client connections Next we configured Kong Gateway to sit in front of our single server to perform port forwarding Kong listened on port for game client connections forwarding those requests to the port on our host where the Minecraft server was accessible Lastly we set up two Minecraft servers to run concurrently Then we configured Kong Gateway to act as a load balancer Kong listened on port for game client connections this time funneling them through its load balancing service to distribute connections across our two servers From here you have many opportunities for adding complexity You can add more game servers For example if some servers run on machines that can handle a heavier load of connections than others then you can configure the load balancer to distribute the load unevenly You can configure health check rules for Kong s load balancer to ensure requests are only forwarded to those servers which are presently healthy You can even select from a handful of load balancing algorithms besides the default round robin strategy So we ve had a little fun and learned to use some important tools and concepts along the way We have discovered that load balancing and port forwarding with Kong Gateway is simple and easy to set up Yet even with such ease these features are extremely powerful Now that you ve got a handle on it it s time to get to work and face the Ender Dragon 2021-06-08 14:41:16
海外TECH DEV Community Finding A Web Design Company - Factors To Consider https://dev.to/alexanderkdev/finding-a-web-design-company-factors-to-consider-11n0 Finding A Web Design Company Factors To ConsiderIn this rapidly changing world where change is the new constant a website s life is only limited to a few years if not correctly designed or updated frequently Thus partnering with an experienced web design company ensures these aspects are taken care of to see a constant rise in the charts 2021-06-08 14:36:48
海外TECH DEV Community What is An Application Programming Interface? https://dev.to/rezaulkarim014/what-is-an-application-programming-interface-5ea6 What is An Application Programming Interface Application Programming InterfaceIn this article I m going to be talking about what an application programming interface Both in general and related specifically to web development Let s start now To get started API stands for application programming interface Which is just a fancy way of saying what one application exposes to another That is the API Let s take an Example of a restaurant to describe how an API Works in non technical terms So when you go to a restaurant you don t go directly up to this chef and tell him what you want to order You need to look at the In order something off of the menu Because the menu tells you what the restaurant offers that is their API This menu the API essentially tells you what that certain application is giving to you and the things that you can use from the application So you go to the restaurant and you order something off of that menu Then after you order something from that menu you tell them what you want And restaurant is Going to give you whatever you ordered off of that menu They re going to give you back data So when you access an API that API you re going to send it what you want then it will send you back information based on what you wanted It But if you go to this restaurant for example a steak restaurant and you try to order a peanut butter jelly sandwich they re going to throw an error at you They re going to tell you we don t serve peanut butter jelly sandwiches You have to choose something on the menu and this makes API s secure because the only exposed what you want to expose to the rest of the world Web Application s Role For example a web application is not going to expose to the database with all the Information passwords They re only going to expose to you the login and sign up pages and not the actual database itself This makes that website secure because they re only exposing the parts that they want to some of the most common forms of API s that you ll run into as a developer are going to be rest API s on the web and library API s from code that you pull into your project Web API sLet s first talk about these web API s which are going to be most likely rest API access These API s exposed different endpoints also known as URLs which you can access to get certain data from that API You can also access these endpoint in order to modify data on these servers but it only is what the application actually exposes to you and wants to let you modify For example you may be able to update it user through a rest API but they re not going to let you update the password They re only going to let you update the name in the email For example You also will to get users from this API but they re not going to return to you the password of the user the does give you the name and the email This is a way that these servers can be secured by only exposing the information They want through this API which is the contract that the server and the client are having between each other Common Application Programming InterfaceThe other most common Application Programming Interface which is not really referred to commonly as an API But is still technically API is an actual library that you pull into your code These libraries have a bunch of different methods to find on them that do specific things When you call them and return to you specific data when you call them this is exactly what an API is it s a contract between this Library code that you ve installed and your actual project that using that libraries code you have different ways that you can access it only Of the methods that they And you aren t able to access the internals of that Library unless it s through the methods that the API of the library exposes to you In ConclusionThe common theme with API s is that the only exposed to exactly what they want you to be able to access And hide away absolutely everything else that they can in order to make their API as secure as possible Also commonly with web API You re going to need some form of token to authenticate yourself with this API Which will allow the application to know whose axis in the API In order to limit what that person can access based on their specific permissions in conclusion API s are absolutely everywhere from technology to non technology related fields and it s really just a contract between two things Look how they can interact with one another It s mostly used to make things more secure and easier to use Because you know how you can use something And it hides away all the stuff that you cannot access which makes it secure That s all an API is Read this article on my blog For more exciting tips and tricks please read our others articlesFind My page on Instagram stack content 2021-06-08 14:33:28
海外TECH DEV Community How to start a task being a junior developer https://dev.to/fabriciadiniz/how-to-start-a-task-being-a-junior-developer-4d16 How to start a task being a junior developer TL DR In this article I talk about strategies I use to efficiently navigate my tasks at work as a junior developer who has ADHD These are the topics covered I went a little further than just starting Before starting a taskWhile developingAt task completionBasically there are types of strategies I use when doing a task those applied to reduce the difficulty of starting those applied during development to smooth the process and those applied at the end of the task to reduce the errors that will pass into code review To help understanding I m going to use a task I did a few months ago a modal in React I have to warn you that these tips will improve your performance in the medium term but in the short term it may seem like you re taking things slower than you d like I suggest talking to your leadership to align the expectations Before starting a taskBefore starting any task I like to understand the code I m going to work with so I look for the components involved in the task and read them taking notes in a notebook about what each one does where the data comes from and what its internal functions do That way I can have a deeper understanding of what I m going to be dealing with and I prevent that information from staying only in my head which is not at all reliable as well create a place to turn to if ever I need to work again on the same components You could argue that doing it this way consumes a lot of task time but I guarantee it makes development easier and reduces time spent looking for bugs later From a junior s perspective you gain code mastery much faster and deeper this way People don t usually do this and I ve found that reading and understanding the code beforehand helps me identify points of attention that go unnoticed even by the more experienced However sometimes the task is to start something from scratch In these cases I look for similar components and do the same procedure to understand what all its code does because this prevents me from just copying code snippets without understanding what they actually do My task of creating a modal fell in this case I had to create the component from scratch based on a more general one that already existed in the project The last thing I do is taking note of the subtasks within the main task Here I try to make them as simple and short as possible because this reduces the time between one subtask and another and greatly improves the development flow Regarding my modal it was something like this create modal componentcondition API call to clickmock API returntest the action of clicking the buttonfind out how to pass information between different components While developingHaving very small and relatively simple subtasks helps reduce the anxiety and procrastination to get started and gives you a better view of progress Sometimes it is necessary to define microsteps to help break the inertia of starting the task and one that helps me a lot when I need to research a difficult topic is to leave the website or documentation open and then get up from the chair for a while For some reason I feel less overwhelmed when I ve just taken a walk and the website I need is already open just waiting for me This also works with the code itself I find the right file to work with and then I ll take a walk around to unwind before starting During the task unforeseen bugs fixes always arise so I write down all the things I didn t anticipate I would have to do and also all the questions that come up to search the internet or ask someone on the team that way nothing gets lost and I guarantee that I will remember to clarify everything Another strategy I have to adopt when it s particularly difficult to focus on the task is to write down the problem I m trying to solve and write down the little conclusions that will lead me to the solution An example of how I do this part at what moment should the click open the modal when an element is registered determined by element isEnabledwhat defines isEnabled At what point is it changed the modal must have isOpen onClose type name date activitiesdate comes from the URL where does the other information come from Does the parent component have them all Do I need to get any of them from somewhere else In some situations it s necessary to do a pair programming and I realized that without my notes I could end up getting pretty lost so I like to take these steps before having someone help me with answers At task completionThis is the time to check if any silly mistakes have gone unnoticed Before submitting an assignment for code review I usually recheck a few things run all the automated integration tests to make sure I didn t accidentally break anythingrun lint if not running automatically update my branch with main masterif necessary update libraries and databaseif necessary resolve merge conflictsrun the code and make sure the behavior is as expected including error casescheck if I ve followed the code standards defined by the companyAnd here s a tip my tech lead gave me if you think the code is bad after finishing the whole task call someone on your team to take a look you can explain what you tried to do and the person can give you feedback on how to improve before submitting to the code review itself Starting a career in development can be quite difficult especially if you ve gone through a career transition or don t have a good theoretical background With this article I would like to share some strategies I use to make tasks less daunting and less anxiety provoking Do you have any more tips to give not only to me but to other people just starting out Leave it in the comments and help some more people 2021-06-08 14:14:04
海外TECH DEV Community Step By Step Visual Roadmap To Any learn programming Language (Practice Questions included) https://dev.to/rishabhraghwendra/step-by-step-visual-roadmap-to-any-learn-programming-language-practice-questions-included-3mci Step By Step Visual Roadmap To Any learn programming Language Practice Questions included It s always a good idea to plan rather than directly jumping in to achieve our goals in a shorter period of time To learn a programming language follow a visual roadmap to understand the basics and succeed in that Practice questions sheets are provided for some important topics This roadmap amp questions are applicable to any language you are learning because concepts are same in every language only syntax is different Note Assuming that you have chosen which programming language to learn So let s get started yippee Learn a new topic and practice that topic on alternate days as shown below Blue bar shows the day to learn a new topic White bar shows the day to practice questions from below the Practice Questions sheet topics that we have learnt a day before Sunday is our day off Visual roadmap of topics that we should know in any programming language Link As promised here s the practice questions sheet Link Questions are not complex but enough to make your concepts clear Solutions of these questions can be very easily found on the internet but try to spend at least mins figuring out the solution With these estimates you can complete the roadmap in about month It s just a rough estimate and can vary from person to person Bonus Tip If you are still searching for best resources to learn C JavaScript Python here s the list C Paid JavaScript Free Python Free At last all I would say is keep on practicing as practice is the only key to success Thanks for reading Written with ️ amp passion by Rishabh Raghwendra 2021-06-08 14:13:00
海外TECH DEV Community Master Design Patterns By Building Real Projects - Chain of Responsibility Pattern - Javascript https://dev.to/hieptl/master-design-patterns-by-building-real-projects-chain-of-responsibility-pattern-javascript-1bce Master Design Patterns By Building Real Projects Chain of Responsibility Pattern Javascript Behavioral Pattern Chain of ResponsibilityThis is the sixth part in my series GoF Design Patterns My series will help you understand about design patterns by building real projects For this reason you can see the places in which each pattern could be applied I want to focus on learning by doing instead of talking too much about theories I m Hiep I work as a full time software engineer Most of my open source projects are focused on one thing to help people learn If the repository is useful please help me share the post and give me a Github It will make me feel motivation to work even harder I will try to make many open sources and share to the community I also created some series that help you improve your practical skills Learn React By Buiding Netflix Table of ContentsNo TopicsDefinition Scenarios Building a Promotion Engine for Amazon Result Definition Chain of responsibility delegates commands to a chain of processing objects Scenarios We can imagine that we are buliding a promotion engine for Amazon When the users add products into their cart The promotion engine will take responsibility to calculate total discount based on the cart s products We will build the following rules If the number of products gt We will discount If the total price gt We will discount In order to implement the feature we just need to write some if else statements However promotion programs are unpredictable because they depend on the business For this reason we need to find the solution which has ability to scale when Amazon wants to have new promotion programs so that we do not need to write too many if else statements We will implement the feature by using Chain of Responsibility pattern Building a Promotion Engine for Amazon I want to use Javascript class to implement the idea because in the case you are using object oriented programming languages or you have to use those languages in the future you can still implement design patterns by using different languages In my opinion design patterns are mindset and approaches and not depend on programming languages Step Create Cart class It will be used to store the information of the shopping cart class Cart constructor this products addProduct product this products push product st NOTE addProduct will be used to add a new product to the cart It accept product as parameter product parameter specifies the product which is belonging to the cart Step The first promotion rule need to be implemented We create NumberDiscount to check about if the number of products gt We will discount class NumberDiscount constructor this nextPromotion null setNext nextPromotion this nextPromotion nextPromotion exec products let currentTotalDiscount if products length gt currentTotalDiscount return currentTotalDiscount this nextPromotion this nextPromotion exec products nd NOTE We are defining Chain of Responsibility It means that we are defining chain of promotion rules That s why we have this next this next determines the next promotion rule which would be executed after the current promotion rule setNext is used to set the next promotion rules by assigning to this next exec is used to apply the current promotion rule to list of cart s products In this case we are checking the number of products If it is gt we will discount In fact we are executing chain of promotion rules Therefore we need to save the result at each step currentTotalDiscount variable help us to achieve that We will store the discount value of the current promotion and add it to the result of the next promotion The process will be continue until we do not have any promotion rules to apply Step The second promotion rule need to be implemented We create TotalPriceDiscount to check if the total price gt We will discount class TotalPriceDiscount constructor this nextPromotion null setNext nextPromotion this nextPromotion nextPromotion calculateTotalPrice products let totalPrice products forEach product gt totalPrice totalPrice product price return totalPrice exec products let currentTotalDiscount const totalPrice this calculateTotalPrice products if totalPrice gt currentTotalDiscount return currentTotalDiscount this nextPromotion this nextPromotion exec products Step After defining different promotion rules we need to build our promotion engine and set up chain of promotion rules class PromotionEngine constructor this numberDiscount new NumberDiscount this priceDiscount new TotalPriceDiscount this numberDiscount setNext this priceDiscount execPromotionEngine products return this numberDiscount exec products rd NOTE The code above describe the magic of setNext function We initialize the first promotion rule numberDiscount and then we continute to initialize the second promotion rule priceDiscount We create a chain of promotion rules by writing this numberDiscount setNext this priceDiscount It means that we want to excecute the numberDiscount promotion first and then execute the priceDiscount promotion The last but not least execPromotionEngine accepts cart s products as parameter The products parameter will be passed to the chain of responsibility in order to apply promotion programs Out full source code will look like this class Cart constructor this products addProduct product this products push product class NumberDiscount constructor this nextPromotion null setNext nextPromotion this nextPromotion nextPromotion exec products let currentTotalDiscount if products length gt currentTotalDiscount return currentTotalDiscount this nextPromotion this nextPromotion exec products class TotalPriceDiscount constructor this nextPromotion null setNext nextPromotion this nextPromotion nextPromotion calculateTotalPrice products let totalPrice products forEach product gt totalPrice totalPrice product price return totalPrice exec products let currentTotalDiscount const totalPrice this calculateTotalPrice products if totalPrice gt currentTotalDiscount return currentTotalDiscount this nextPromotion this nextPromotion exec products class PromotionEngine constructor this numberDiscount new NumberDiscount this priceDiscount new TotalPriceDiscount this numberDiscount setNext this priceDiscount execPromotionEngine products return this numberDiscount exec products const cart new Cart cart addProduct id name Product A price cart addProduct id name Product B price cart addProduct id name Product C price cart addProduct id name Product D price cart addProduct id name Product E price const promotionEngine new PromotionEngine const totalDiscount promotionEngine execPromotionEngine cart products console log total discount totalDiscount Result total discount The above result describes that the total discount value was calculated by applying Chain of Responsibility pattern By using design patterns we can understand the core concepts and make our code become more readable and cleaner I hope that the post can help you understand about Chain of Responsibility pattern Thanks and Best Regards Hiep 2021-06-08 14:11:16
Apple AppleInsider - Frontpage News Apple TV+ 'Only Apple Originals' trailer hypes inbound shows and movies https://appleinsider.com/articles/21/06/08/apple-tv-only-apple-originals-trailer-hypes-inbound-shows-and-movies?utm_medium=rss Apple TV x Only Apple Originals x trailer hypes inbound shows and moviesApple has released a compilation trailer to show off all of the content you can watch on Apple TV this summer with the collection of Only Apple Originals including both currently available shows and movies as well as upcoming releases Set to The Beach Boys Wouldn t it Be Nice the two minute trailer takes viewers through a series of scenes from its programming Throughout it describes Apple Originals as unexpected and breaks the mold Read more 2021-06-08 14:52:57
Apple AppleInsider - Frontpage News Apple's M1 Mac mini with 512GB SSD is back down to $799 ($100 off) https://appleinsider.com/articles/21/06/08/apples-m1-mac-mini-with-512gb-ssd-is-back-down-to-799-100-off?utm_medium=rss Apple x s M Mac mini with GB SSD is back down to off On the heels of yesterday s Mac mini special for WWDC Apple resellers are now discounting the upgraded model with GB of storage by bringing the price down to off M Mac miniBoth Amazon and B amp H are discounting the GB M Mac mini with units in stock and ready to ship Read more 2021-06-08 14:40:07
Apple AppleInsider - Frontpage News Aqara debuts two new smart home hubs compatible with HomeKit, Zigbee 3.0 https://appleinsider.com/articles/21/06/08/aqara-debuts-two-new-smart-home-hubs-compatible-with-homekit-zigbee-30?utm_medium=rss Aqara debuts two new smart home hubs compatible with HomeKit Zigbee Aqara has announced a pair of new smart home hubs that are compatible with Apple HomeKit and feature the newest generation of the Zigbee wireless protocol Credit AqaraOn Tuesday the smart home company unveiled a new Aqara Hub M smart hub and a next generation Aqara Hub MS an upgraded version of its original hub Read more 2021-06-08 14:24:16
Apple AppleInsider - Frontpage News Spatial Audio on Apple Music feels 'something different,' says host Zane Lowe https://appleinsider.com/articles/21/06/08/spatial-audio-on-apple-music-feels-something-different-says-host-zane-lowe?utm_medium=rss Spatial Audio on Apple Music feels x something different x says host Zane LoweSpatial Audio in Apple Music will be an exciting journey for the music industry according to Zane Lowe with artists being given more freedom in the three dimensional environment to express their music than with stereo On Monday Apple rolled out support for both Lossless and Spatial Audio in Apple Music giving subscribers new ways to listen to songs Apple Music s co head of Artist Relations and radio host Zane Lowe offered an explanation on Tuesday about how much of an impact Spatial Audio could have for musicians in the future Speaking about his first time with Spatial Audio using AirPods Lowe was at first confused but then found it hard to put the experience into words due to being born into stereo Read more 2021-06-08 14:19:36
海外TECH Engadget 'Ron's Gone Wrong' trailer stars Zach Galifianakis as a buggy domestic robot https://www.engadget.com/rons-gone-wrong-trailer-144539743.html?src=rss_b2c x Ron x s Gone Wrong x trailer stars Zach Galifianakis as a buggy domestic robotThe Ron s Gone Wrong trailer explores what it means to be human ーwith a buggy home robot played by Zach Galifianakis 2021-06-08 14:45:39
海外TECH Engadget 'Prince of Persia: The Sands of Time Remake' won't be at E3 https://www.engadget.com/prince-of-persia-the-sands-of-time-remake-e3-ubisoft-forward-140307649.html?src=rss_b2c release 2021-06-08 14:03:07
海外TECH Engadget Blast Box lets musician stream performances that are only available for 24 hours https://www.engadget.com/blast-radio-disappearing-music-streams-140038155.html?src=rss_b2c Blast Box lets musician stream performances that are only available for hoursBlast Radio has launched a service where musicians can broadcast performances that disappear in hours and they can stream through an easy to use box 2021-06-08 14:00:38
海外科学 NYT > Science A U.N. Declaration on Ending AIDS Should Have Been Easy. It Wasn’t. https://www.nytimes.com/2021/06/08/health/unaids-declaration-patents.html A U N Declaration on Ending AIDS Should Have Been Easy It Wasn t Even with U N s previous goals unmet delegates tried to water down provisions regarding protections for vulnerable populations and patents for essential drugs 2021-06-08 14:38:31
ニュース BBC News - Home Covid: Greater Manchester and Lancashire to get extra help https://www.bbc.co.uk/news/uk-england-manchester-57400378 delta 2021-06-08 14:18:58
ニュース BBC News - Home France President Emmanuel Macron slapped in the face https://www.bbc.co.uk/news/world-europe-57402753 france 2021-06-08 14:45:29
ニュース BBC News - Home Srebrenica massacre: UN court rejects Mladic genocide appeal https://www.bbc.co.uk/news/world-europe-57346523 conviction 2021-06-08 14:45:07
ニュース BBC News - Home Paul Givan announced as new NI first minister https://www.bbc.co.uk/news/uk-northern-ireland-57399375 april 2021-06-08 14:32:05
ニュース BBC News - Home Euro 2020: Vaccine passports to be used at Wembley group fixtures https://www.bbc.co.uk/sport/football/57404223 fixturesengland 2021-06-08 14:52:38
ニュース BBC News - Home Covid: Scotland would 'move quickly' to vaccinate children https://www.bbc.co.uk/news/uk-scotland-scotland-politics-57403680 children 2021-06-08 14:33:59
ニュース BBC News - Home Boundary review: Winners and losers from proposed changes https://www.bbc.co.uk/news/uk-politics-57400901 government 2021-06-08 14:05:30
ニュース BBC News - Home Johanna Konta beats Lesley Pattinama Kerkhove in Nottingham opener. https://www.bbc.co.uk/sport/tennis/57404088 Johanna Konta beats Lesley Pattinama Kerkhove in Nottingham opener Top seed and British number one Johanna Konta cruises through Nottingham opener with a straight sets win over the Netherlands Lesley Pattinama Kerkhove 2021-06-08 14:39:45
ビジネス ダイヤモンド・オンライン - 新着記事 東京五輪、中止の決定権は誰の手に? - WSJ発 https://diamond.jp/articles/-/273509 東京五輪 2021-06-08 23:21:00
北海道 北海道新聞 コロナ治療、緊張絶えず 中等症患者受け入れの中標津病院 「たちまち逼迫の恐れ」 https://www.hokkaido-np.co.jp/article/553177/ 受け入れ 2021-06-08 23:16:14
北海道 北海道新聞 世界のメディア一時閲覧不能に 米クラウド企業が原因 https://www.hokkaido-np.co.jp/article/553238/ 閲覧不能 2021-06-08 23:07:13
北海道 北海道新聞 ブレーキ利かず7キロ走行 JR函館線で保線作業用車両 https://www.hokkaido-np.co.jp/article/553263/ 車両 2021-06-08 23:05:22
北海道 北海道新聞 道内旅行助成に197億円 道の補正予算案、自宅療養に26億円 https://www.hokkaido-np.co.jp/article/553254/ 新型コロナウイルス 2021-06-08 23:03:03

コメント

このブログの人気の投稿

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