投稿時間:2021-11-20 19:19:27 RSSフィード2021-11-20 19:00 分まとめ(23件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Accessクエリとレポート 同じ値でグループ化 https://teratail.com/questions/370264?rss=all Accessクエリとレポート同じ値でグループ化商品ごとの販売日と販売先を記録したテーブルがあります。 2021-11-20 18:56:05
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Typescriptで<A>() => Aは一体何なのか? https://teratail.com/questions/370263?rss=all TypescriptでltAgtgtAは一体何なのかexporttypeEqualsltAextendsanyAextendsanygtltAgtgtAextendsAextendsltAgtgtAextendsAAnyEqualでこのようなソースがありますやっている事は何となく分かります。 2021-11-20 18:54:34
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Javaでキャスト演算を使って、小数点を含めた、各スコアの平均点を求めたい。 https://teratail.com/questions/370262?rss=all Javaでキャスト演算を使って、小数点を含めた、各スコアの平均点を求めたい。 2021-11-20 18:50:35
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) mecabやjanomeで分かち書きした動詞の活用形を変換したい https://teratail.com/questions/370261?rss=all janome 2021-11-20 18:45:16
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Google SuggestのJSONパース https://teratail.com/questions/370260?rss=all GoogleSuggestのJSONパースGoogleのサジェストを取得したいと思い、以下のようなコードを書きましたが、Anyとなってしまうのでどのように値を取得すればいいのでしょうかSwift初心者です。 2021-11-20 18:43:51
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Javascript(typescript)でクエリー名をとってきた引数を設定するとundefinedになる https://teratail.com/questions/370259?rss=all 引数からとってきた名前を使うためにはどのように設定したら良いのでしょうか。 2021-11-20 18:42:19
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) MySqlの中でIF的なことをしたい https://teratail.com/questions/370258?rss=all MySqlの中でIF的なことをしたいMYSQLについて伺います。 2021-11-20 18:39:19
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) vagrantでのIPアドレスの設定が出来ない https://teratail.com/questions/370257?rss=all 2021-11-20 18:36:53
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) エラーの原因がわからない https://teratail.com/questions/370256?rss=all 2021-11-20 18:24:34
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) WP_Query で、複数の post_parent に属する記事を1件ずつ日付順に表示 https://teratail.com/questions/370255?rss=all 2021-11-20 18:17:37
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) multiprocessing で Queue を使ったときに、Queueが更新されない https://teratail.com/questions/370254?rss=all multiprocessingでQueueを使ったときに、Queueが更新されない以下のようにqueueに値を入れ、その値を取得しようとすると、queueに値が入っていないと出力されます。 2021-11-20 18:09:37
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Pythonで複数のCSVファイルのセルの平均値をとる https://teratail.com/questions/370253?rss=all Pythonで複数のCSVファイルのセルの平均値をとる現在、大量のCSVファイルがあり、それらの値の平均値をとったCSVファイルを新たに作成するPythonスクリプトを作成したいです。 2021-11-20 18:01:25
AWS AWSタグが付けられた新着投稿 - Qiita nginx(Elastic Beanstalk)で413 Request Entity Too Largeが発生した場合の対処 https://qiita.com/chanchanko/items/0cd8f4939614893c40dc nginxElasticBeanstalkでRequestEntityTooLargeが発生した場合の対処現象開発中のアプリで、画像データをBeseエンコードしてJsonに含めてバックエンドにPOSTした場合に、RequestEntityTooLargeが発生。 2021-11-20 18:32:31
Git Gitタグが付けられた新着投稿 - Qiita こんなGitの使い方はイヤだ ~教科書に載らないGitの使い方 https://qiita.com/tennis99jp/items/ab66158d0a7b7fdd80a6 ということは本番環境へのデプロイはgitpullではなく、ファイルを直接FTPで更新しているコミットのメッセージは日付gitの使い方に慣れてきた担当者のコミットを見て驚いた。 2021-11-20 18:35:48
海外TECH MakeUseOf 5 Photography Courses and Guides to Learn to Take Better Pictures https://www.makeuseof.com/photography-courses-and-guides-learn-to-take-better-pictures/ Photography Courses and Guides to Learn to Take Better PicturesThe internet offers excellent free photography courses and guides for all skill levels to learn anything you would need to take a great picture 2021-11-20 09:30:22
海外TECH DEV Community Google Login in React https://dev.to/heyvik/google-login-in-react-2m97 Google Login in ReactHello developers in this blog I am going tell you that how can you implement google signin login in your app website I am using react google login library for this blog Else you can do it with firebase too but it has a different process First Steps •You must need a google account •You have to generate a client id with google api •While generating a client id you need to permit the url in which the login system will work example mysite com Following me on twitter will help us both so consider following Using the librarynpm install react google login or yarn add react google loginimport GoogleLogin from react google login function App const responseGoogle response gt console log response return lt GoogleLogin clientId your client id buttonText Login onSuccess responseGoogle onFailure responseGoogle cookiePolicy single host origin gt How to keep you logged inTo keep your user logged in you need you use isSignedIn props lt GoogleLogin clientId your client id onSuccess responseGoogle isSignedIn true gt Get user info to displayIt is pretty simple to get user info in case you want to display it const name setName useState const email setEmail useState const picture setPicture useState const responseGoogle response gt console log response getting user info setName response profileObj name setEmail response profileObj email setPicture response profileObj imageUrl Bonusyou can use a loginStatus setLoginStatus useState system to redirect you once someone is logged in Thanks for reading this blog till now if you get any errors or questions You can ask me those in the comments below 2021-11-20 09:25:05
海外TECH DEV Community retry method in laravel https://dev.to/marcosgad/retry-method-in-laravel-1pin retry method in laravelThe retry function attempts to execute the given callback until the given maximum attempt threshold is met If the callback does not throw an exception its return value will be returned If the callback throws an exception it will automatically be retried If the maximum attempt count is exceeded the exception will be thrownfunction retry times callable callback sleep when null return retry function attempts Attempt times while resting ms in between attempts echo Try attempts now gt toTimeString PHP EOL Throw new Exception Failed Try Try Try Exception Failed with callback function truereturn retry function attempts Attempt times while resting ms in between attempts echo Try attempts now gt toTimeString PHP EOL Throw new Exception Failed function return true Try Try Try Exception Failed with callback function falsereturn retry function attempts Attempt times while resting ms in between attempts echo Try attempts now gt toTimeString PHP EOL Throw new Exception Failed function return false Try Exception Failed It can be used in real life with Http client response retry function return Http get Retry in the Http client response Http retries gt get I hope you enjoy the code 2021-11-20 09:23:43
海外TECH DEV Community Game In A Month: Serverless Leaderboards https://dev.to/miketalbot/game-in-a-month-serverless-leaderboards-16pd Game In A Month Serverless LeaderboardsI found myself out of work for the last month and decided to use my time with my partner to build a game We ve participated in Game Jams before but never really got anything to a production state This time we wanted it to be different We decided to build the game in Unity and used some really nice Synty assets for the world and Malbers animations for our key rabbit characters along side some custom assets and a whole lot of level design We needed three key things that fall outside of the Unity stack A website to host a free preview version of the game A service on that site that can share photos to Facebook that are uploaded from the game even if from a mobile app etcA highscore table that ran in seasons and could return the top scores and the position in the total leaderboard of the current player LeaderboardsLeaderboards are a non trivial problem even if you have a server with a database you are having to do sorts on large numbers of records albeit that indexes can help a lot with this it s still quite a load To find the relative position of a player in a million scores you need to traverse the sorted list If you decide like we did that you don t want to go to the cost of running a server and opt for serverless in our case Firebase then your problem intensifies It would be very expensive indeed to use one of the Firebase databases to try to run a leaderboard due to the pricing model and you can t benefit from in memory caching in Serverless architectures The ideal way to run a leaderboard is to use ZSets in Redis Redis is fantastic at these kinds of operations and so I decided on implementing the following stack Run the website as a Cloud Function in Firebase this way I can implement an Express app to record scores and download the current top scores I use Pug to create sharing pages for a user s images with the correct Open Graph tags so Facebook posts link through properly and show the image Use Upstash as a serverless Redis implementation it has a generous free tier and the price won t get out of hand even if the game is very successfulUse my cloud based Express app to query Redis for scores and to record new ones Create a React app for the site and host that in the same Express Cloud functionI also decided that I would do day seasons so the leaderboard is for currently active players not those who played months ago This is easy with Redis I just add the current date rounded to an int to the key used for the highscores The CodeI m going to start by showing you the entire code for the website excluding the pug view I m doing this because I can t quite believe how tiny it is const functions require firebase functions const express require express const path require path const bodyParser require body parser const app express app use require compression app use bodyParser urlencoded extended true app use bodyParser json app set views path join dirname views app set view engine pug Facebook share pageapp get shared req res gt res render shared image req query image token req query token const season Math floor Date now const HIGHSCORES highscores season const REDIS PASSWORD REDIS PASSWORD HERE const REDIS HEADER Bearer MY BEARER TOKEN const REDIS BASEURL const Redis require ioredis function createRedisConnection return new Redis redis UPSTASH ADDRESS AND PASSWORD Heartbeat apiapp get info req res gt res render info API to record a scoreapp post addscorerecord async body id name score response gt const redis createRedisConnection await redis zadd HIGHSCORES score id await redis set id JSON stringify id name score await redis set id name name let rank await redis zrank HIGHSCORES id if rank undefined rank null rank redis disconnect response send rank time Date now function groupResults results const output for let i i lt results length i output push results i results i return output API to get the Highscore tableapp post gethighscoretable async body id response gt const redis createRedisConnection let rank await redis zrank HIGHSCORES id if rank null rank undefined rank const topScores await redis zrange HIGHSCORES withscores const scores if topScores amp amp topScores length const pipe redis pipeline let groupedResults groupResults topScores for const id score of groupedResults pipe get id name const names await pipe exec for let i i lt groupedResults length i const score groupedResults i scores push score score name names i redis disconnect response send rank scores time Date now API to get the server timeapp get time req res gt res send time Date now This serves the Unity gameapp use express static path join dirname public Return all other paths to the index html for React routingapp use req res gt res sendFile path join dirname public index html err gt res status send err exports app functions https onRequest app Recording a scoreThe process of recording a score is pretty simple The game provides a score an id for the player and the name that they want displayed for their score The id and the score are placed in a ZSet with the score negated so that higher scores come first app post addscorerecord async body id name score response gt const redis createRedisConnection await redis zadd HIGHSCORES score id Next I record the name for the ID so we can look it up quickly and a whole record of the current score and name for the player this latter is unnecessary in the current code but I have a plan for it later await redis set id JSON stringify id name score await redis set id name name Finally we use Redis magic to quickly work out the current rank of the player let rank await redis zrank HIGHSCORES id if rank undefined rank null rank We finally package up the response and send it to Unity as a JSON packet redis disconnect response send rank time Date now  Getting the highscore tableIt s not much harder to retrieve the highscore table we get the top scores and repeat the current player ranking operation For this to work we just need the id of the player app post gethighscoretable async body id response gt const redis createRedisConnection let rank await redis zrank HIGHSCORES id if rank null rank undefined rank Next we request the top scores including both the score and the id const topScores await redis zrange HIGHSCORES withscores The we need to turn ids into names const scores if topScores amp amp topScores length const pipe redis pipeline let groupedResults groupResults topScores for const id score of groupedResults pipe get id name const names await pipe exec for let i i lt groupedResults length i const score groupedResults i scores push score score name names i You can see I use a pipeline operation in Redis to make the call for things all at once for performance reasons Next we just need to return the data redis disconnect response send rank scores time Date now Calling From UnityUnity makes it pretty easy to call these functions and use the results I implemented an HTTP helper first this allows HTTP requests as Unity coroutines namespace Wabbit public static class HttpHelp public static IEnumerator GetJson lt T gt string url Action lt T gt response where T new var request new UnityWebRequest url GET yield return request SendWebRequest while request isDone yield return null if request result UnityWebRequest Result Success var o new T var item JsonUtility FromJson lt T gt request downloadHandler text response item public static IEnumerator PostJson string url object data Action lt string gt response null var request new UnityWebRequest url POST var body Encoding UTF GetBytes JsonUtility ToJson data request uploadHandler new UploadHandlerRaw body request downloadHandler new DownloadHandlerBuffer request SetRequestHeader Content Type application json yield return request SendWebRequest while request isDone yield return null if response null amp amp request result UnityWebRequest Result Success response request downloadHandler text Recording a score and retrieving scores use this helper function but we have to define classes that will be translated to and from JSON so they come first Serializable public class ScoreRecord public string id public string name public int score Serializable public class Ranking public int rank Serializable public class ScoreEntry public string name public int score Serializable public class HighScoreTable public int time public int rank public ScoreEntry scores Now recording a score is just a matter of using the helper with the correct class as a parameter private static IEnumerator SendScore yield return HttpHelp PostJson new ScoreRecord id Controls PlayerInfo id name Controls PlayerInfo userName score Controls PlayerInfo highScore result gt var ranking JsonUtility FromJson lt Ranking gt result currentRank ranking rank Events Raise GotRank ConclusionI found it was pretty easy to setup a free tiered serverless environment that combines Firebase with Upstash to allow a simple leaderboard system to be developed While this example doesn t cover some of the extensions you would add to avoid cheating it shows a cheap and performant way to make simple highscore functionality You can download the iOS and Mac versions of Wabbits from the App Store The Droid version is awaiting approval 2021-11-20 09:21:52
金融 ニュース - 保険市場TIMES 東京海上日動ら、ドローンを活用した保全高度化支援サービスの提供を開始 https://www.hokende.com/news/blog/entry/2021/11/20/190000 2021-11-20 19:00:00
海外ニュース Japan Times latest articles Kishida says Japan considering releasing oil reserves to stabilize prices https://www.japantimes.co.jp/news/2021/11/20/business/japan-oil-reserves-release/ Kishida says Japan considering releasing oil reserves to stabilize pricesJapan has never previously released crude oil stockpiles in response to rising prices with past decisions made to address supply concerns following disasters and political 2021-11-20 18:14:52
海外ニュース Japan Times latest articles Recipe: Loaded twice-baked ikura potatoes https://www.japantimes.co.jp/life/2021/11/20/food/recipe-loaded-twice-baked-potatoes-roe-ikura/ plain 2021-11-20 18:45:09
ニュース BBC News - Home Tim Paine inquiry decision sent wrong message - Cricket Australia https://www.bbc.co.uk/sport/cricket/59358231?at_medium=RSS&at_campaign=KARANGA Tim Paine inquiry decision sent wrong message Cricket AustraliaCricket Australia should have handled the investigation into sexually explicit texts sent by Tim Paine to a female colleague differently admits its chief executive 2021-11-20 09:11:59
北海道 北海道新聞 政府、石油余剰分の売却検討 首相「日米の協調前提」 https://www.hokkaido-np.co.jp/article/613936/ 原油価格 2021-11-20 18: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件)